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/optimizer/prep/prepjointree.c | |
| parent | 883f4b42d7292f1a7142e55046cee86f92049b5a (diff) | |
| download | postgresql-3f8db37c2f1eeeffd9dae3189b783a463f56fe77.tar.gz | |
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/optimizer/prep/prepjointree.c')
| -rw-r--r-- | src/backend/optimizer/prep/prepjointree.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/backend/optimizer/prep/prepjointree.c b/src/backend/optimizer/prep/prepjointree.c index ad128605dc..ef92d9d3c9 100644 --- a/src/backend/optimizer/prep/prepjointree.c +++ b/src/backend/optimizer/prep/prepjointree.c @@ -15,7 +15,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/optimizer/prep/prepjointree.c,v 1.41 2006/08/12 02:52:05 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/optimizer/prep/prepjointree.c,v 1.42 2006/08/12 20:05:55 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -623,7 +623,6 @@ is_simple_subquery(Query *subquery) */ if (!IsA(subquery, Query) || subquery->commandType != CMD_SELECT || - subquery->resultRelation != 0 || subquery->into != NULL) elog(ERROR, "subquery is bogus"); @@ -686,7 +685,6 @@ is_simple_union_all(Query *subquery) /* Let's just make sure it's a valid subselect ... */ if (!IsA(subquery, Query) || subquery->commandType != CMD_SELECT || - subquery->resultRelation != 0 || subquery->into != NULL) elog(ERROR, "subquery is bogus"); |
