aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-03-25 23:27:59 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-03-25 23:27:59 +0000
commitbf8236526be85bc3f061a918dbf49a28bc9bc220 (patch)
tree884ac85f29507b9885d1afc805be8ac65d5f2089 /src/backend/executor
parente85a01df678c9621c225200f1309ca8e682338ff (diff)
downloadpostgresql-bf8236526be85bc3f061a918dbf49a28bc9bc220.tar.gz
postgresql-bf8236526be85bc3f061a918dbf49a28bc9bc220.zip
Remove the prohibition on executing cursor commands through SPI_execute.
Vadim had included this restriction in the original design of the SPI code, but I'm darned if I can see a reason for it. I left the macro definition of SPI_ERROR_CURSOR in place, so as not to needlessly break any SPI callers that are checking for it, but that code will never actually be returned anymore.
Diffstat (limited to 'src/backend/executor')
-rw-r--r--src/backend/executor/spi.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c
index e0856a3d8f2..d6127c19d84 100644
--- a/src/backend/executor/spi.c
+++ b/src/backend/executor/spi.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/executor/spi.c,v 1.173 2007/03/17 03:15:38 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/executor/spi.c,v 1.174 2007/03/25 23:27:59 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1155,8 +1155,6 @@ SPI_result_code_string(int code)
return "SPI_ERROR_OPUNKNOWN";
case SPI_ERROR_UNCONNECTED:
return "SPI_ERROR_UNCONNECTED";
- case SPI_ERROR_CURSOR:
- return "SPI_ERROR_CURSOR";
case SPI_ERROR_ARGUMENT:
return "SPI_ERROR_ARGUMENT";
case SPI_ERROR_PARAM:
@@ -1490,13 +1488,6 @@ _SPI_execute_plan(SPIPlanPtr plan, Datum *Values, const char *Nulls,
goto fail;
}
}
- else if (IsA(stmt, DeclareCursorStmt) ||
- IsA(stmt, ClosePortalStmt) ||
- IsA(stmt, FetchStmt))
- {
- my_res = SPI_ERROR_CURSOR;
- goto fail;
- }
else if (IsA(stmt, TransactionStmt))
{
my_res = SPI_ERROR_TRANSACTION;