diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-03-22 01:49:38 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-03-22 01:49:38 +0000 |
commit | 05f916e6add9726bf4ee046e4060c1b03c9961f2 (patch) | |
tree | d5045cb6bd1b27d4b9af7c05c94e53e6c08736b9 /src/backend/parser/parse_clause.c | |
parent | e43094b1249a0e2814d0759d545ccfe786baef3d (diff) | |
download | postgresql-05f916e6add9726bf4ee046e4060c1b03c9961f2.tar.gz postgresql-05f916e6add9726bf4ee046e4060c1b03c9961f2.zip |
Adjust subquery qual pushdown rules to be more forgiving: if a qual
refers to a non-DISTINCT output column of a DISTINCT ON subquery, or
if it refers to a function-returning-set, we cannot push it down.
But the old implementation refused to push down *any* quals if the
subquery had any such 'dangerous' outputs. Now we just look at the
output columns actually referenced by each qual expression. More code
than before, but probably no slower since we don't make unnecessary checks.
Diffstat (limited to 'src/backend/parser/parse_clause.c')
-rw-r--r-- | src/backend/parser/parse_clause.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c index d4c13165e5a..2fd5811000a 100644 --- a/src/backend/parser/parse_clause.c +++ b/src/backend/parser/parse_clause.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.111 2003/03/10 03:53:51 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.112 2003/03/22 01:49:38 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -60,7 +60,6 @@ static TargetEntry *findTargetlistEntry(ParseState *pstate, Node *node, List *tlist, int clause); static List *addTargetToSortList(TargetEntry *tle, List *sortlist, List *targetlist, List *opname); -static bool targetIsInSortList(TargetEntry *tle, List *sortList); /* @@ -1386,7 +1385,7 @@ assignSortGroupRef(TargetEntry *tle, List *tlist) * reason we need this routine (and not just a quick test for nonzeroness * of ressortgroupref) is that a TLE might be in only one of the lists. */ -static bool +bool targetIsInSortList(TargetEntry *tle, List *sortList) { Index ref = tle->resdom->ressortgroupref; |