mirror of
https://github.com/postgres/postgres.git
synced 2025-07-09 22:41:56 +03:00
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.
This commit is contained in:
@ -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).
|
||||
|
Reference in New Issue
Block a user