aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/utility.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2002-08-04 04:31:44 +0000
committerBruce Momjian <bruce@momjian.us>2002-08-04 04:31:44 +0000
commit19e0e35bcd3d0a1e46cb294ab08fbe062d4cf0d6 (patch)
tree0e46bff54197af8970529fc54e8766cbcda23567 /src/backend/tcop/utility.c
parentfecc04f95a136bbfbded44c476d597eed6ac6258 (diff)
downloadpostgresql-19e0e35bcd3d0a1e46cb294ab08fbe062d4cf0d6.tar.gz
postgresql-19e0e35bcd3d0a1e46cb294ab08fbe062d4cf0d6.zip
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
Diffstat (limited to 'src/backend/tcop/utility.c')
-rw-r--r--src/backend/tcop/utility.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c
index fd0f10d58aa..8c3af9ac9ce 100644
--- a/src/backend/tcop/utility.c
+++ b/src/backend/tcop/utility.c
@@ -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;