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/include/parser/parse_clause.h | |
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/include/parser/parse_clause.h')
-rw-r--r-- | src/include/parser/parse_clause.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/include/parser/parse_clause.h b/src/include/parser/parse_clause.h index 07beb6fa03f..da7e7abec4d 100644 --- a/src/include/parser/parse_clause.h +++ b/src/include/parser/parse_clause.h @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * * parse_clause.h - * + * handle clauses in parser * * * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: parse_clause.h,v 1.29 2002/06/20 20:29:51 momjian Exp $ + * $Id: parse_clause.h,v 1.30 2003/03/22 01:49:38 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -30,5 +30,6 @@ extern List *transformDistinctClause(ParseState *pstate, List *distinctlist, extern List *addAllTargetsToSortList(List *sortlist, List *targetlist); extern Index assignSortGroupRef(TargetEntry *tle, List *tlist); +extern bool targetIsInSortList(TargetEntry *tle, List *sortList); #endif /* PARSE_CLAUSE_H */ |