mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +03:00
The attached patch implements START TRANSACTION, per SQL99. The
functionality of the command is basically identical to that of BEGIN; it just accepts a few extra options (only one of which PostgreSQL currently implements), and is standards-compliant. The patch includes a simple regression test and documentation. [ Regression tests removed, per Peter.] Neil Conway
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.167 2002/07/30 16:55:45 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.168 2002/08/04 04:31:44 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -205,6 +205,28 @@ ProcessUtility(Node *parsetree,
|
||||
BeginTransactionBlock();
|
||||
break;
|
||||
|
||||
/*
|
||||
* START TRANSACTION, as defined by SQL99: Identical to BEGIN,
|
||||
* except that it takes a few additional options.
|
||||
*/
|
||||
case START:
|
||||
{
|
||||
BeginTransactionBlock();
|
||||
|
||||
/*
|
||||
* Currently, the only option that can be set is
|
||||
* the transaction isolation level by START
|
||||
* TRANSACTION.
|
||||
*/
|
||||
if (stmt->options)
|
||||
{
|
||||
SetPGVariable("TRANSACTION ISOLATION LEVEL",
|
||||
stmt->options,
|
||||
false);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case COMMIT:
|
||||
EndTransactionBlock();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user