1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-27 23:21:58 +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:
Tom Lane
2003-07-16 17:25:48 +00:00
parent 96be4b28a3
commit 93236b58e0
4 changed files with 64 additions and 7 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.72 2003/06/06 15:04:02 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.73 2003/07/16 17:25:48 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -733,6 +733,16 @@ AddQual(Query *parsetree, Node *qual)
elog(ERROR, "Conditional utility statements are not implemented");
}
if (parsetree->setOperations != NULL)
{
/*
* There's noplace to put the qual on a setop statement, either.
* (This could be fixed, but right now the planner simply ignores
* any qual condition on a setop query.)
*/
elog(ERROR, "Conditional UNION/INTERSECT/EXCEPT statements are not implemented");
}
/* INTERSECT want's the original, but we need to copy - Jan */
copy = copyObject(qual);
@ -773,6 +783,16 @@ AddHavingQual(Query *parsetree, Node *havingQual)
elog(ERROR, "Conditional utility statements are not implemented");
}
if (parsetree->setOperations != NULL)
{
/*
* There's noplace to put the qual on a setop statement, either.
* (This could be fixed, but right now the planner simply ignores
* any qual condition on a setop query.)
*/
elog(ERROR, "Conditional UNION/INTERSECT/EXCEPT statements are not implemented");
}
/* INTERSECT want's the original, but we need to copy - Jan */
copy = copyObject(havingQual);