mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
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.
This commit is contained in:
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user