aboutsummaryrefslogtreecommitdiff
path: root/src/backend/rewrite/rewriteManip.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-07-16 17:25:48 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-07-16 17:25:48 +0000
commit93236b58e088cd2151540528d484da9ad82e48c8 (patch)
tree5d12e2000fc4813421d32b94e042d6a04ce07e29 /src/backend/rewrite/rewriteManip.c
parent96be4b28a31e37d2eb2757118164a6c9ae297d46 (diff)
downloadpostgresql-93236b58e088cd2151540528d484da9ad82e48c8.tar.gz
postgresql-93236b58e088cd2151540528d484da9ad82e48c8.zip
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/rewrite/rewriteManip.c')
-rw-r--r--src/backend/rewrite/rewriteManip.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/backend/rewrite/rewriteManip.c b/src/backend/rewrite/rewriteManip.c
index 0d3dbe7d6e6..1cd42a44f76 100644
--- a/src/backend/rewrite/rewriteManip.c
+++ b/src/backend/rewrite/rewriteManip.c
@@ -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);