summaryrefslogtreecommitdiff
path: root/src/include/nodes
diff options
context:
space:
mode:
authorTom Lane2006-08-12 20:05:56 +0000
committerTom Lane2006-08-12 20:05:56 +0000
commit3f8db37c2f1eeeffd9dae3189b783a463f56fe77 (patch)
treef6520123161af6191b5f53262d67eab69b24eccf /src/include/nodes
parent883f4b42d7292f1a7142e55046cee86f92049b5a (diff)
Tweak SPI_cursor_open to allow INSERT/UPDATE/DELETE RETURNING; this was
merely a matter of fixing the error check, since the underlying Portal infrastructure already handles it. This in turn allows these statements to be used in some existing plpgsql and plperl contexts, such as a plpgsql FOR loop. Also, do some marginal code cleanup in places that were being sloppy about distinguishing SELECT from SELECT INTO.
Diffstat (limited to 'src/include/nodes')
-rw-r--r--src/include/nodes/parsenodes.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index f0f40e002e1..222f5d26cc3 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.322 2006/08/12 02:52:06 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.323 2006/08/12 20:05:56 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -89,7 +89,8 @@ typedef struct Query
Node *utilityStmt; /* non-null if this is a non-optimizable
* statement */
- int resultRelation; /* target relation (index into rtable) */
+ int resultRelation; /* rtable index of target relation for
+ * INSERT/UPDATE/DELETE; 0 for SELECT */
RangeVar *into; /* target relation for SELECT INTO */
List *intoOptions; /* options from WITH clause */