diff --git a/doc/src/sgml/spi.sgml b/doc/src/sgml/spi.sgml index c7c4304b3a7..14e975b5fc9 100644 --- a/doc/src/sgml/spi.sgml +++ b/doc/src/sgml/spi.sgml @@ -1,4 +1,4 @@ - + Server Programming Interface @@ -554,21 +554,11 @@ typedef struct - - SPI_ERROR_CURSOR - - - if DECLARE, CLOSE, or FETCH - was attempted - - - - SPI_ERROR_TRANSACTION - if any command involving transaction manipulation was attempted + if a transaction manipulation command was attempted (BEGIN, COMMIT, ROLLBACK, 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; diff --git a/src/include/executor/spi.h b/src/include/executor/spi.h index c041726a45a..80c8993c7c3 100644 --- a/src/include/executor/spi.h +++ b/src/include/executor/spi.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/executor/spi.h,v 1.59 2007/03/15 23:12:06 tgl Exp $ + * $PostgreSQL: pgsql/src/include/executor/spi.h,v 1.60 2007/03/25 23:27:59 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -61,7 +61,7 @@ typedef struct _SPI_plan *SPIPlanPtr; #define SPI_ERROR_COPY (-2) #define SPI_ERROR_OPUNKNOWN (-3) #define SPI_ERROR_UNCONNECTED (-4) -#define SPI_ERROR_CURSOR (-5) +#define SPI_ERROR_CURSOR (-5) /* not used anymore */ #define SPI_ERROR_ARGUMENT (-6) #define SPI_ERROR_PARAM (-7) #define SPI_ERROR_TRANSACTION (-8) diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c index eb29d7333a8..165ce0426ec 100644 --- a/src/pl/plpgsql/src/pl_exec.c +++ b/src/pl/plpgsql/src/pl_exec.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.190 2007/03/15 23:12:07 tgl Exp $ + * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.191 2007/03/25 23:27:59 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -2327,11 +2327,6 @@ exec_prepare_plan(PLpgSQL_execstate *estate, ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("cannot COPY to/from client in PL/pgSQL"))); - case SPI_ERROR_CURSOR: - ereport(ERROR, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot manipulate cursors directly in PL/pgSQL"), - errhint("Use PL/pgSQL's cursor features instead."))); case SPI_ERROR_TRANSACTION: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), @@ -2631,11 +2626,6 @@ exec_stmt_dynexecute(PLpgSQL_execstate *estate, ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("cannot COPY to/from client in PL/pgSQL"))); - case SPI_ERROR_CURSOR: - ereport(ERROR, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot manipulate cursors directly in PL/pgSQL"), - errhint("Use PL/pgSQL's cursor features instead."))); case SPI_ERROR_TRANSACTION: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),