diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-08-12 20:05:56 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-08-12 20:05:56 +0000 |
commit | 3f8db37c2f1eeeffd9dae3189b783a463f56fe77 (patch) | |
tree | f6520123161af6191b5f53262d67eab69b24eccf /src/backend/parser/parse_expr.c | |
parent | 883f4b42d7292f1a7142e55046cee86f92049b5a (diff) | |
download | postgresql-3f8db37c2f1eeeffd9dae3189b783a463f56fe77.tar.gz postgresql-3f8db37c2f1eeeffd9dae3189b783a463f56fe77.zip |
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/backend/parser/parse_expr.c')
-rw-r--r-- | src/backend/parser/parse_expr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c index 6a7117e98bf..0812c3d4418 100644 --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/parse_expr.c,v 1.196 2006/08/02 01:59:46 joe Exp $ + * $PostgreSQL: pgsql/src/backend/parser/parse_expr.c,v 1.197 2006/08/12 20:05:55 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1104,7 +1104,7 @@ transformSubLink(ParseState *pstate, SubLink *sublink) elog(ERROR, "bad query in sub-select"); qtree = (Query *) linitial(qtrees); if (qtree->commandType != CMD_SELECT || - qtree->resultRelation != 0) + qtree->into != NULL) elog(ERROR, "bad query in sub-select"); sublink->subselect = (Node *) qtree; |