Skip to content

Commit a3f1c36

Browse files
committed
Quite limited support for subselects in clausesel.c.
Get rid of #ifdef INDEXSCAN_PATCH in indxpath.c.
1 parent dc892fd commit a3f1c36

File tree

2 files changed

+12
-15
lines changed

2 files changed

+12
-15
lines changed

src/backend/optimizer/path/clausesel.c

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.4 1997/09/08 21:44:47 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.5 1998/02/13 03:29:36 vadim Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -273,12 +273,19 @@ compute_selec(Query *root, List *clauses, List *or_selectivities)
273273
/* this isn't an Oper, it's a Func!! */
274274

275275
/*
276-
* * This is not an operator, so we guess at the selectivity. *
277-
* THIS IS A HACK TO GET V4 OUT THE DOOR. FUNCS SHOULD BE * ABLE
278-
* TO HAVE SELECTIVITIES THEMSELVES. * -- JMH 7/9/92
276+
* This is not an operator, so we guess at the selectivity.
277+
* THIS IS A HACK TO GET V4 OUT THE DOOR. FUNCS SHOULD BE ABLE
278+
* TO HAVE SELECTIVITIES THEMSELVES. -- JMH 7/9/92
279279
*/
280280
s1 = 0.1;
281281
}
282+
else if (is_subplan ((Node *) clause))
283+
{
284+
/*
285+
* Just for the moment! FIX ME! - vadim 02/04/98
286+
*/
287+
s1 = 1.0;
288+
}
282289
else if (NumRelids((Node *) clause) == 1)
283290
{
284291

src/backend/optimizer/path/indxpath.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.12 1997/11/20 23:21:47 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.13 1998/02/13 03:29:39 vadim Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -614,13 +614,8 @@ match_clause_to_indexkey(Rel *rel,
614614
/*
615615
* Check for standard s-argable clause
616616
*/
617-
#ifdef INDEXSCAN_PATCH
618-
/* Handle also function parameters. DZ - 27-8-1996 */
619617
if ((rightop && IsA(rightop, Const)) ||
620618
(rightop && IsA(rightop, Param)))
621-
#else
622-
if (rightop && IsA(rightop, Const))
623-
#endif
624619
{
625620
restrict_op = ((Oper *) ((Expr *) clause)->oper)->opno;
626621
isIndexable =
@@ -634,13 +629,8 @@ match_clause_to_indexkey(Rel *rel,
634629
/*
635630
* Must try to commute the clause to standard s-arg format.
636631
*/
637-
#ifdef INDEXSCAN_PATCH
638-
/* ...And here... - vadim 01/22/97 */
639632
else if ((leftop && IsA(leftop, Const)) ||
640633
(leftop && IsA(leftop, Param)))
641-
#else
642-
else if (leftop && IsA(leftop, Const))
643-
#endif
644634
{
645635
restrict_op =
646636
get_commutator(((Oper *) ((Expr *) clause)->oper)->opno);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy