]> granicus.if.org Git - postgresql/commitdiff
Quite limited support for subselects in clausesel.c.
authorVadim B. Mikheev <vadim4o@yahoo.com>
Fri, 13 Feb 1998 03:29:39 +0000 (03:29 +0000)
committerVadim B. Mikheev <vadim4o@yahoo.com>
Fri, 13 Feb 1998 03:29:39 +0000 (03:29 +0000)
Get rid of #ifdef INDEXSCAN_PATCH in indxpath.c.

src/backend/optimizer/path/clausesel.c
src/backend/optimizer/path/indxpath.c

index 78b54eebbb7eaa695197b9ec0730916549bfa5db..54c2c9b831d9dee19525d0c476d86549d1cf09d6 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.4 1997/09/08 21:44:47 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.5 1998/02/13 03:29:36 vadim Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -273,12 +273,19 @@ compute_selec(Query *root, List *clauses, List *or_selectivities)
                /* this isn't an Oper, it's a Func!! */
 
                /*
-                * * This is not an operator, so we guess at the selectivity. *
-                * THIS IS A HACK TO GET V4 OUT THE DOOR.  FUNCS SHOULD BE ABLE
-                * TO HAVE SELECTIVITIES THEMSELVES. *     -- JMH 7/9/92
+                * This is not an operator, so we guess at the selectivity. 
+                * THIS IS A HACK TO GET V4 OUT THE DOOR.  FUNCS SHOULD BE ABLE
+                * TO HAVE SELECTIVITIES THEMSELVES.       -- JMH 7/9/92
                 */
                s1 = 0.1;
        }
+       else if (is_subplan ((Node *) clause))
+       {
+               /*
+                * Just for the moment! FIX ME! - vadim 02/04/98
+                */
+               s1 = 1.0;
+       }
        else if (NumRelids((Node *) clause) == 1)
        {
 
index 2fc43e0fdab2c0399519fa98c7b57d264e5c48de..50d8fb934eb6aae6de8eabe5d54a0e878567270d 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.12 1997/11/20 23:21:47 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.13 1998/02/13 03:29:39 vadim Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -614,13 +614,8 @@ match_clause_to_indexkey(Rel *rel,
                /*
                 * Check for standard s-argable clause
                 */
-#ifdef INDEXSCAN_PATCH
-               /* Handle also function parameters.  DZ - 27-8-1996 */
                if ((rightop && IsA(rightop, Const)) ||
                        (rightop && IsA(rightop, Param)))
-#else
-               if (rightop && IsA(rightop, Const))
-#endif
                {
                        restrict_op = ((Oper *) ((Expr *) clause)->oper)->opno;
                        isIndexable =
@@ -634,13 +629,8 @@ match_clause_to_indexkey(Rel *rel,
                /*
                 * Must try to commute the clause to standard s-arg format.
                 */
-#ifdef INDEXSCAN_PATCH
-               /* ...And here...  - vadim 01/22/97 */
                else if ((leftop && IsA(leftop, Const)) ||
                                 (leftop && IsA(leftop, Param)))
-#else
-               else if (leftop && IsA(leftop, Const))
-#endif
                {
                        restrict_op =
                                get_commutator(((Oper *) ((Expr *) clause)->oper)->opno);