aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-12-05 19:15:10 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-12-05 19:15:10 +0000
commita51f004d29c67823e3a99e9aff141ce9333df0e2 (patch)
tree940bd0aa2afb2c1fb02a12a6d4871f5caa4a78e4 /src/include
parentd9466046c076b023b55d448d3cce6980dac24865 (diff)
downloadpostgresql-a51f004d29c67823e3a99e9aff141ce9333df0e2.tar.gz
postgresql-a51f004d29c67823e3a99e9aff141ce9333df0e2.zip
Repair breakage of rules containing INSERT ... SELECT actions, per bug
report from Joel Burton. Turns out that my simple idea of turning the SELECT into a subquery does not interact well *at all* with the way the rule rewriter works. Really what we need to make INSERT ... SELECT work cleanly is to decouple targetlists from rangetables: an INSERT ... SELECT wants to have two levels of targetlist but only one rangetable. No time for that for 7.1, however, so I've inserted some ugly hacks to make the rewriter know explicitly about the structure of INSERT ... SELECT queries. Ugh :-(
Diffstat (limited to 'src/include')
-rw-r--r--src/include/rewrite/rewriteManip.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/include/rewrite/rewriteManip.h b/src/include/rewrite/rewriteManip.h
index 2cfbf0e061f..85b3a774cab 100644
--- a/src/include/rewrite/rewriteManip.h
+++ b/src/include/rewrite/rewriteManip.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: rewriteManip.h,v 1.23 2000/09/29 18:21:24 tgl Exp $
+ * $Id: rewriteManip.h,v 1.24 2000/12/05 19:15:10 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -28,6 +28,8 @@ extern bool rangeTableEntry_used(Node *node, int rt_index,
extern bool attribute_used(Node *node, int rt_index, int attno,
int sublevels_up);
+extern Query *getInsertSelectQuery(Query *parsetree, Query ***subquery_ptr);
+
extern void AddQual(Query *parsetree, Node *qual);
extern void AddHavingQual(Query *parsetree, Node *havingQual);
extern void AddNotQual(Query *parsetree, Node *qual);
@@ -37,6 +39,5 @@ extern bool checkExprHasSubLink(Node *node);
extern Node *ResolveNew(Node *node, int target_varno, int sublevels_up,
List *targetlist, int event, int update_varno);
-extern void FixNew(RewriteInfo *info, Query *parsetree);
#endif /* REWRITEMANIP_H */