START TRANSACTION

Started by Nonameover 23 years ago9 messages
#1Noname
nconway@klamath.dyndns.org
1 attachment(s)

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.

Cheers,

Neil

--
Neil Conway <neilconway@rogers.com>
PGP Key ID: DB3C29FC

Attachments:

start-trans-2.patchtext/plain; charset=us-asciiDownload
Index: doc/src/sgml/reference.sgml
===================================================================
RCS file: /var/lib/cvs/pgsql/doc/src/sgml/reference.sgml,v
retrieving revision 1.31
diff -c -r1.31 reference.sgml
*** doc/src/sgml/reference.sgml	22 Jul 2002 08:57:15 -0000	1.31
--- doc/src/sgml/reference.sgml	27 Jul 2002 05:22:28 -0000
***************
*** 120,125 ****
--- 120,126 ----
     &setSessionAuth;
     &setTransaction;
     &show;
+    &startTransaction;
     &truncate;
     &unlisten;
     &update;
Index: doc/src/sgml/ref/allfiles.sgml
===================================================================
RCS file: /var/lib/cvs/pgsql/doc/src/sgml/ref/allfiles.sgml,v
retrieving revision 1.42
diff -c -r1.42 allfiles.sgml
*** doc/src/sgml/ref/allfiles.sgml	22 Jul 2002 08:57:15 -0000	1.42
--- doc/src/sgml/ref/allfiles.sgml	27 Jul 2002 05:22:28 -0000
***************
*** 111,116 ****
--- 111,117 ----
  <!entity setSessionAuth     system "set_session_auth.sgml">
  <!entity setTransaction     system "set_transaction.sgml">
  <!entity show               system "show.sgml">
+ <!entity startTransaction	system "start_transaction.sgml">
  <!entity truncate           system "truncate.sgml">
  <!entity unlisten           system "unlisten.sgml">
  <!entity update             system "update.sgml">
Index: doc/src/sgml/ref/begin.sgml
===================================================================
RCS file: /var/lib/cvs/pgsql/doc/src/sgml/ref/begin.sgml,v
retrieving revision 1.17
diff -c -r1.17 begin.sgml
*** doc/src/sgml/ref/begin.sgml	21 Apr 2002 19:02:39 -0000	1.17
--- doc/src/sgml/ref/begin.sgml	27 Jul 2002 05:22:28 -0000
***************
*** 21,27 ****
    <refsynopsisdivinfo>
     <date>1999-07-20</date>
    </refsynopsisdivinfo>
!   <synopsis>  
  BEGIN [ WORK | TRANSACTION ]
    </synopsis>
    
--- 21,27 ----
    <refsynopsisdivinfo>
     <date>1999-07-20</date>
    </refsynopsisdivinfo>
!   <synopsis>
  BEGIN [ WORK | TRANSACTION ]
    </synopsis>
    
Index: doc/src/sgml/ref/set_transaction.sgml
===================================================================
RCS file: /var/lib/cvs/pgsql/doc/src/sgml/ref/set_transaction.sgml,v
retrieving revision 1.8
diff -c -r1.8 set_transaction.sgml
*** doc/src/sgml/ref/set_transaction.sgml	20 Jan 2002 22:19:57 -0000	1.8
--- doc/src/sgml/ref/set_transaction.sgml	27 Jul 2002 05:22:28 -0000
***************
*** 97,107 ****
     <title>SQL92, SQL99</title>
  
     <para>
!     SERIALIZABLE is the default level in <acronym>SQL</acronym>.
!     <productname>PostgreSQL</productname> does not provide the
!     isolation levels <option>READ UNCOMMITTED</option> 
!     and <option>REPEATABLE READ</option>. Because
!     of multiversion concurrency control, the serializable level is not
      truly serializable. See the <citetitle>User's Guide</citetitle> for
      details.
     </para>
--- 97,107 ----
     <title>SQL92, SQL99</title>
  
     <para>
!     <option>SERIALIZABLE</option> is the default level in
!     <acronym>SQL</acronym>.  <productname>PostgreSQL</productname> does
!     not provide the isolation levels <option>READ UNCOMMITTED</option> 
!     and <option>REPEATABLE READ</option>. Because of multiversion
!     concurrency control, the <option>SERIALIZABLE</option> level is not
      truly serializable. See the <citetitle>User's Guide</citetitle> for
      details.
     </para>
Index: doc/src/sgml/ref/start_transaction.sgml
===================================================================
RCS file: doc/src/sgml/ref/start_transaction.sgml
diff -N doc/src/sgml/ref/start_transaction.sgml
*** /dev/null	1 Jan 1970 00:00:00 -0000
--- doc/src/sgml/ref/start_transaction.sgml	27 Jul 2002 05:22:28 -0000
***************
*** 0 ****
--- 1,137 ----
+ <!-- $Header$ -->
+ <refentry id="SQL-START-TRANSACTION">
+  <docinfo>
+   <date>2002-07-26</date>
+  </docinfo>
+ 
+  <refmeta>
+   <refentrytitle id="SQL-START-TRANSACTION-TITLE">START TRANSACTION</refentrytitle>
+   <refmiscinfo>SQL - Language Statements</refmiscinfo>
+  </refmeta>
+ 
+  <refnamediv>
+   <refname>START TRANSACTION</refname>
+   <refpurpose>start a transaction block</refpurpose>
+  </refnamediv>
+ 
+  <refsynopsisdiv>
+   <synopsis>
+ START TRANSACTION [ ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE } ]
+   </synopsis>
+ 
+   <refsect2 id="R2-SQL-START-TRANSACTION-1">
+    <refsect2info>
+     <date>1998-09-27</date>
+    </refsect2info>
+    <title>
+     Inputs
+    </title>
+ 
+    <para>
+     None.
+    </para>
+   </refsect2>
+ 
+   <refsect2 id="R2-SQL-START-TRANSACTION-2">
+    <refsect2info>
+     <date>1998-09-27</date>
+    </refsect2info>
+    <title>
+     Outputs
+    </title>
+ 
+    <para>
+ 
+     <variablelist>
+      <varlistentry>
+       <term><computeroutput>
+ START TRANSACTION
+        </computeroutput></term>
+       <listitem>
+        <para>
+     Message returned if successful.
+        </para>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term><computeroutput>
+ WARNING:  BEGIN: already a transaction in progress
+        </computeroutput></term>
+       <listitem>
+        <para>
+     If there is already a transaction in progress when the
+     command is issued.
+        </para>
+       </listitem>
+      </varlistentry>
+     </variablelist>
+    </para>
+   </refsect2>
+  </refsynopsisdiv>
+ 
+  <refsect1>
+   <title>Description</title>
+ 
+   <para>
+    This command begins a new transaction. If the isolation level is
+    specified, the new transaction has that isolation level. In all other
+    respects, the behavior of this command is identical to the
+    <command>BEGIN</command>.
+   </para>
+ 
+  </refsect1>
+ 
+  <refsect1>
+   <title>Notes</title>
+ 
+   <para>
+    The isolation level of a transaction can also be set with the <xref
+    linkend="sql-set-transaction" endterm="sql-set-transaction-title">.
+    If no isolation level is specified, the level defaults to
+    <option>READ COMMITTED</option>.
+   </para>
+  </refsect1>
+ 
+  <refsect1 id="R1-SQL-START-TRANSACTION-3">
+   <title>Compatibility</title>
+ 
+   <refsect2 id="R2-SQL-START-TRANSACTION-4">
+    <title>SQL99</title>
+ 
+    <para>
+     <option>SERIALIZABLE</option> is the default level in
+     <acronym>SQL</acronym>. <productname>PostgreSQL</productname>
+     does not provide the isolation levels <option>READ UNCOMMITTED</option>
+     and <option>REPEATABLE READ</option>. Because of multiversion
+     concurrency control, the <option>SERIALIZABLE</option> level is
+     not truly serializable. See the <citetitle>User's Guide</citetitle>
+     for details.
+    </para>
+ 
+    <para>
+     In <acronym>SQL99</acronym> this statement can specify two other
+     properties of the new transaction: whether the transaction is
+     read-only and the size of the diagnostics area. Neither of these
+     concepts are currently supported in
+     <productname>PostgreSQL</productname>.
+    </para>
+   </refsect2>
+  </refsect1>
+ </refentry>
+ 
+ <!-- Keep this comment at the end of the file
+ Local variables:
+ mode:sgml
+ sgml-omittag:nil
+ sgml-shorttag:t
+ sgml-minimize-attributes:nil
+ sgml-always-quote-attributes:t
+ sgml-indent-step:1
+ sgml-indent-data:t
+ sgml-parent-document:nil
+ sgml-default-dtd-file:"../reference.ced"
+ sgml-exposed-tags:nil
+ sgml-local-catalogs:("/usr/lib/sgml/catalog")
+ sgml-local-ecat-files:nil
+ End:
+ -->
Index: src/backend/nodes/copyfuncs.c
===================================================================
RCS file: /var/lib/cvs/pgsql/src/backend/nodes/copyfuncs.c,v
retrieving revision 1.197
diff -c -r1.197 copyfuncs.c
*** src/backend/nodes/copyfuncs.c	24 Jul 2002 19:11:10 -0000	1.197
--- src/backend/nodes/copyfuncs.c	27 Jul 2002 05:22:29 -0000
***************
*** 2213,2218 ****
--- 2213,2219 ----
  	TransactionStmt *newnode = makeNode(TransactionStmt);
  
  	newnode->command = from->command;
+ 	Node_Copy(from, newnode, options);
  
  	return newnode;
  }
Index: src/backend/nodes/equalfuncs.c
===================================================================
RCS file: /var/lib/cvs/pgsql/src/backend/nodes/equalfuncs.c,v
retrieving revision 1.144
diff -c -r1.144 equalfuncs.c
*** src/backend/nodes/equalfuncs.c	24 Jul 2002 19:11:10 -0000	1.144
--- src/backend/nodes/equalfuncs.c	27 Jul 2002 05:22:29 -0000
***************
*** 1043,1048 ****
--- 1043,1050 ----
  {
  	if (a->command != b->command)
  		return false;
+ 	if (!equal(a->options, b->options))
+ 		return false;
  
  	return true;
  }
Index: src/backend/parser/gram.y
===================================================================
RCS file: /var/lib/cvs/pgsql/src/backend/parser/gram.y,v
retrieving revision 2.349
diff -c -r2.349 gram.y
*** src/backend/parser/gram.y	24 Jul 2002 19:11:10 -0000	2.349
--- src/backend/parser/gram.y	27 Jul 2002 05:22:29 -0000
***************
*** 195,201 ****
  
  %type <str>		opt_id,	all_Op, MathOp, opt_name, SpecialRuleRelation
  
! %type <str>		opt_level, opt_encoding
  %type <node>	grantee
  %type <list>	grantee_list
  %type <ival>	privilege
--- 195,201 ----
  
  %type <str>		opt_id,	all_Op, MathOp, opt_name, SpecialRuleRelation
  
! %type <str>		iso_level, opt_encoding
  %type <node>	grantee
  %type <list>	grantee_list
  %type <ival>	privilege
***************
*** 218,224 ****
  				target_list, update_target_list, insert_column_list,
  				insert_target_list, def_list, opt_indirection,
  				group_clause, TriggerFuncArgs, select_limit,
! 				opt_select_limit
  
  %type <range>	into_clause, OptTempTableName
  
--- 218,224 ----
  				target_list, update_target_list, insert_column_list,
  				insert_target_list, def_list, opt_indirection,
  				group_clause, TriggerFuncArgs, select_limit,
! 				opt_select_limit, trans_options
  
  %type <range>	into_clause, OptTempTableName
  
***************
*** 845,858 ****
  						n->args = makeList1($3);
  					$$ = n;
  				}
! 			| TRANSACTION ISOLATION LEVEL opt_level opt_mode
  				{
  					VariableSetStmt *n = makeNode(VariableSetStmt);
  					n->name = "TRANSACTION ISOLATION LEVEL";
  					n->args = makeList1(makeStringConst($4, NULL));
  					$$ = n;
  				}
! 			| SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL opt_level
  				{
  					VariableSetStmt *n = makeNode(VariableSetStmt);
  					n->name = "default_transaction_isolation";
--- 845,858 ----
  						n->args = makeList1($3);
  					$$ = n;
  				}
! 			| TRANSACTION ISOLATION LEVEL iso_level opt_mode
  				{
  					VariableSetStmt *n = makeNode(VariableSetStmt);
  					n->name = "TRANSACTION ISOLATION LEVEL";
  					n->args = makeList1(makeStringConst($4, NULL));
  					$$ = n;
  				}
! 			| SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL iso_level
  				{
  					VariableSetStmt *n = makeNode(VariableSetStmt);
  					n->name = "default_transaction_isolation";
***************
*** 900,906 ****
  				{ $$ = makeAConst($1); }
  		;
  
! opt_level:	READ COMMITTED							{ $$ = "read committed"; }
  			| SERIALIZABLE							{ $$ = "serializable"; }
  		;
  
--- 900,906 ----
  				{ $$ = makeAConst($1); }
  		;
  
! iso_level:	READ COMMITTED							{ $$ = "read committed"; }
  			| SERIALIZABLE							{ $$ = "serializable"; }
  		;
  
***************
*** 3373,3439 ****
  				{
  					TransactionStmt *n = makeNode(TransactionStmt);
  					n->command = ROLLBACK;
  					$$ = (Node *)n;
  				}
  			| BEGIN_TRANS opt_trans
  				{
  					TransactionStmt *n = makeNode(TransactionStmt);
  					n->command = BEGIN_TRANS;
  					$$ = (Node *)n;
  				}
! 			| COMMIT opt_trans
  				{
  					TransactionStmt *n = makeNode(TransactionStmt);
! 					n->command = COMMIT;
  					$$ = (Node *)n;
  				}
! 			| COMMIT opt_trans opt_chain
  				{
  					TransactionStmt *n = makeNode(TransactionStmt);
  					n->command = COMMIT;
  					$$ = (Node *)n;
  				}
  			| END_TRANS opt_trans
  				{
  					TransactionStmt *n = makeNode(TransactionStmt);
  					n->command = COMMIT;
  					$$ = (Node *)n;
  				}
  			| ROLLBACK opt_trans
  				{
  					TransactionStmt *n = makeNode(TransactionStmt);
  					n->command = ROLLBACK;
! 					$$ = (Node *)n;
! 				}
! 			| ROLLBACK opt_trans opt_chain
! 				{
! 					TransactionStmt *n = makeNode(TransactionStmt);
! 					n->command = ROLLBACK;
  					$$ = (Node *)n;
  				}
  		;
  
  opt_trans:	WORK									{}
  			| TRANSACTION							{}
  			| /*EMPTY*/								{}
  		;
  
- opt_chain:	AND NO CHAIN							{}
- 			| AND CHAIN
- 				{
- 					/* SQL99 asks that conforming dbs reject AND CHAIN
- 					 * if they don't support it. So we can't just ignore it.
- 					 * - thomas 2000-08-06
- 					 */
- 					elog(ERROR, "COMMIT/AND CHAIN not yet supported");
- 				}
- 		;
- 
- 
  /*****************************************************************************
   *
   *		QUERY:
!  *				define view <viewname> '('target-list ')' [where <quals> ]
   *
   *****************************************************************************/
  
--- 3373,3432 ----
  				{
  					TransactionStmt *n = makeNode(TransactionStmt);
  					n->command = ROLLBACK;
+ 					n->options = NIL;
  					$$ = (Node *)n;
  				}
  			| BEGIN_TRANS opt_trans
  				{
  					TransactionStmt *n = makeNode(TransactionStmt);
  					n->command = BEGIN_TRANS;
+ 					n->options = NIL;
  					$$ = (Node *)n;
  				}
! 			| START TRANSACTION trans_options
  				{
  					TransactionStmt *n = makeNode(TransactionStmt);
! 					n->command = START;
! 					n->options = $3;
  					$$ = (Node *)n;
  				}
! 			| COMMIT opt_trans
  				{
  					TransactionStmt *n = makeNode(TransactionStmt);
  					n->command = COMMIT;
+ 					n->options = NIL;
  					$$ = (Node *)n;
  				}
  			| END_TRANS opt_trans
  				{
  					TransactionStmt *n = makeNode(TransactionStmt);
  					n->command = COMMIT;
+ 					n->options = NIL;
  					$$ = (Node *)n;
  				}
  			| ROLLBACK opt_trans
  				{
  					TransactionStmt *n = makeNode(TransactionStmt);
  					n->command = ROLLBACK;
! 					n->options = NIL;
  					$$ = (Node *)n;
  				}
  		;
  
+ trans_options:	ISOLATION LEVEL iso_level
+ 									{ $$ = makeList1(makeStringConst($3, NULL)); }
+ 			 |	/* EMPTY */			{ $$ = NIL; }
+ 			 ;
+ 
  opt_trans:	WORK									{}
  			| TRANSACTION							{}
  			| /*EMPTY*/								{}
  		;
  
  /*****************************************************************************
   *
   *		QUERY:
!  *				create view <viewname> '('target-list ')' AS <query>
   *
   *****************************************************************************/
  
Index: src/backend/tcop/postgres.c
===================================================================
RCS file: /var/lib/cvs/pgsql/src/backend/tcop/postgres.c,v
retrieving revision 1.272
diff -c -r1.272 postgres.c
*** src/backend/tcop/postgres.c	18 Jul 2002 23:11:28 -0000	1.272
--- src/backend/tcop/postgres.c	27 Jul 2002 05:22:29 -0000
***************
*** 2160,2165 ****
--- 2160,2169 ----
  						tag = "BEGIN";
  						break;
  
+ 					case START:
+ 						tag = "START TRANSACTION";
+ 						break;
+ 
  					case COMMIT:
  						tag = "COMMIT";
  						break;
Index: src/backend/tcop/utility.c
===================================================================
RCS file: /var/lib/cvs/pgsql/src/backend/tcop/utility.c,v
retrieving revision 1.165
diff -c -r1.165 utility.c
*** src/backend/tcop/utility.c	25 Jul 2002 10:07:11 -0000	1.165
--- src/backend/tcop/utility.c	27 Jul 2002 05:22:29 -0000
***************
*** 205,210 ****
--- 205,232 ----
  						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;
Index: src/include/nodes/parsenodes.h
===================================================================
RCS file: /var/lib/cvs/pgsql/src/include/nodes/parsenodes.h,v
retrieving revision 1.194
diff -c -r1.194 parsenodes.h
*** src/include/nodes/parsenodes.h	24 Jul 2002 19:11:14 -0000	1.194
--- src/include/nodes/parsenodes.h	27 Jul 2002 05:22:29 -0000
***************
*** 1354,1366 ****
  } UnlistenStmt;
  
  /* ----------------------
!  *		{Begin|Abort|End} Transaction Statement
   * ----------------------
   */
  typedef struct TransactionStmt
  {
  	NodeTag		type;
! 	int			command;		/* BEGIN|END|ABORT */
  } TransactionStmt;
  
  /* ----------------------
--- 1354,1367 ----
  } UnlistenStmt;
  
  /* ----------------------
!  *		{Begin|Commit|Rollback} Transaction Statement
   * ----------------------
   */
  typedef struct TransactionStmt
  {
  	NodeTag		type;
! 	int			command;		/* BEGIN_TRANS|START|COMMIT|ROLLBACK */
! 	List	   *options;
  } TransactionStmt;
  
  /* ----------------------
Index: src/test/regress/expected/transactions.out
===================================================================
RCS file: /var/lib/cvs/pgsql/src/test/regress/expected/transactions.out,v
retrieving revision 1.2
diff -c -r1.2 transactions.out
*** src/test/regress/expected/transactions.out	9 Jan 2000 03:48:39 -0000	1.2
--- src/test/regress/expected/transactions.out	27 Jul 2002 05:22:29 -0000
***************
*** 40,42 ****
--- 40,56 ----
    42 |  324.78
  (4 rows)
  
+ SHOW TRANSACTION ISOLATION LEVEL;
+  TRANSACTION ISOLATION LEVEL 
+ -----------------------------
+  READ COMMITTED
+ (1 row)
+ 
+ START TRANSACTION ISOLATION LEVEL serializable;
+ SHOW TRANSACTION ISOLATION LEVEL;
+  TRANSACTION ISOLATION LEVEL 
+ -----------------------------
+  SERIALIZABLE
+ (1 row)
+ 
+ ROLLBACK;
Index: src/test/regress/sql/transactions.sql
===================================================================
RCS file: /var/lib/cvs/pgsql/src/test/regress/sql/transactions.sql,v
retrieving revision 1.2
diff -c -r1.2 transactions.sql
*** src/test/regress/sql/transactions.sql	6 Jan 2000 06:41:55 -0000	1.2
--- src/test/regress/sql/transactions.sql	27 Jul 2002 05:22:29 -0000
***************
*** 33,35 ****
--- 33,42 ----
  -- should have members again 
  SELECT * FROM aggtest;
  
+ SHOW TRANSACTION ISOLATION LEVEL;
+ 
+ START TRANSACTION ISOLATION LEVEL serializable;
+ 
+ SHOW TRANSACTION ISOLATION LEVEL;
+ 
+ ROLLBACK;
#2Noname
nconway@klamath.dyndns.org
In reply to: Noname (#1)
Re: START TRANSACTION

On Sat, Jul 27, 2002 at 04:05:20PM -0400, Neil Conway wrote:

The attached patch implements START TRANSACTION, per SQL99.

Oh, forgot to mention two things: I also removed the grammar's
"support" for chained transactions, since it was basically non-
existent (I don't see the advantage of producing an "chained
transactions not support" error rather than a generic one).
I also renamed the 'opt_level' production to 'iso_level', since
it's not "optional".

Cheers,

Neil

--
Neil Conway <neilconway@rogers.com>
PGP Key ID: DB3C29FC

#3Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Noname (#1)
Re: START TRANSACTION

Your patch has been added to the PostgreSQL unapplied patches list at:

http://candle.pha.pa.us/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------

Neil Conway wrote:

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.

Cheers,

Neil

--
Neil Conway <neilconway@rogers.com>
PGP Key ID: DB3C29FC

[ Attachment, skipping... ]

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#4Peter Eisentraut
peter_e@gmx.net
In reply to: Noname (#1)
Re: START TRANSACTION

Neil Conway writes:

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.

Very nice patch, but I don't think we need the regression test. It's a
bit too simple.

--
Peter Eisentraut peter_e@gmx.net

#5Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Peter Eisentraut (#4)
Re: START TRANSACTION

Peter Eisentraut wrote:

Neil Conway writes:

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.

Very nice patch, but I don't think we need the regression test. It's a
bit too simple.

Roger.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#6Alvaro Herrera
alvherre@atentus.com
In reply to: Peter Eisentraut (#4)
Re: [PATCHES] START TRANSACTION

Peter Eisentraut dijo:

Neil Conway writes:

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.

Very nice patch, but I don't think we need the regression test. It's a
bit too simple.

That makes me wonder: should I produce some regression tests for
CLUSTER?

--
Alvaro Herrera (<alvherre[a]atentus.com>)
"Investigaci�n es lo que hago cuando no s� lo que estoy haciendo"
(Wernher von Braun)

#7Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Noname (#1)
Re: START TRANSACTION

[ Regression test removed, per Peter.]

Patch applied. Thanks.

---------------------------------------------------------------------------

Neil Conway wrote:

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.

Cheers,

Neil

--
Neil Conway <neilconway@rogers.com>
PGP Key ID: DB3C29FC

[ Attachment, skipping... ]

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#8Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alvaro Herrera (#6)
Re: [PATCHES] START TRANSACTION

Alvaro Herrera <alvherre@atentus.com> writes:

That makes me wonder: should I produce some regression tests for
CLUSTER?

It'd be a good thing.

regards, tom lane

#9Alvaro Herrera
alvherre@atentus.com
In reply to: Tom Lane (#8)
2 attachment(s)
CLUSTER regression test

Tom Lane dijo:

Alvaro Herrera <alvherre@atentus.com> writes:

That makes me wonder: should I produce some regression tests for
CLUSTER?

It'd be a good thing.

I'm attaching cluster.sql and cluster.out to be added to the regression
tests.

--
Alvaro Herrera (<alvherre[a]atentus.com>)
"In Europe they call me Niklaus Wirth; in the US they call me Nickel's worth.
That's because in Europe they call me by name, and in the US by value!"

Attachments:

cluster.outtext/plain; charset=US-ASCII; name=cluster.outDownload
cluster.sqltext/plain; charset=US-ASCII; name=cluster.sqlDownload