diff options
| author | Tom Lane | 2003-07-16 17:25:48 +0000 |
|---|---|---|
| committer | Tom Lane | 2003-07-16 17:25:48 +0000 |
| commit | 93236b58e088cd2151540528d484da9ad82e48c8 (patch) | |
| tree | 5d12e2000fc4813421d32b94e042d6a04ce07e29 /src/backend/optimizer | |
| parent | 96be4b28a31e37d2eb2757118164a6c9ae297d46 (diff) | |
Add defenses against trying to attach qual conditions to a setOperation
query node, since that won't work unless the planner is upgraded.
Someday we should try to support at least some cases of this, but for
now just plug the hole in the dike. Per discussion with Dmitry Tkach.
Diffstat (limited to 'src/backend/optimizer')
| -rw-r--r-- | src/backend/optimizer/prep/prepunion.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c index 03674e8990f..d14c3c98e1f 100644 --- a/src/backend/optimizer/prep/prepunion.c +++ b/src/backend/optimizer/prep/prepunion.c @@ -14,7 +14,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.97 2003/06/29 23:05:04 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.98 2003/07/16 17:25:48 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -85,6 +85,14 @@ plan_set_operations(Query *parse) Assert(topop && IsA(topop, SetOperationStmt)); + /* check for unsupported stuff */ + Assert(parse->utilityStmt == NULL); + Assert(parse->jointree->fromlist == NIL); + Assert(parse->jointree->quals == NULL); + Assert(parse->groupClause == NIL); + Assert(parse->havingQual == NULL); + Assert(parse->distinctClause == NIL); + /* * Find the leftmost component Query. We need to use its column names * for all generated tlists (else SELECT INTO won't work right). |
