mirror of
https://github.com/postgres/postgres.git
synced 2025-05-17 06:41:24 +03:00
Back-patch fix to disallow BEGIN/COMMIT/ROLLBACK inside SQL functions.
Not sure why this isn't causing serious problems in some simple tests, but it definitely isn't going to do anything desirable...
This commit is contained in:
parent
aa1c232be7
commit
097597578e
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.75 2003/09/25 18:58:35 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.75.2.1 2004/09/06 18:23:09 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -303,6 +303,11 @@ postquel_getnext(execution_state *es)
|
||||
|
||||
if (es->qd->operation == CMD_UTILITY)
|
||||
{
|
||||
/* Can't handle starting or committing a transaction */
|
||||
if (IsA(es->qd->parsetree->utilityStmt, TransactionStmt))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("cannot begin/end transactions in SQL functions")));
|
||||
ProcessUtility(es->qd->parsetree->utilityStmt, es->qd->dest, NULL);
|
||||
return (TupleTableSlot *) NULL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user