Index: doc/src/sgml/libpq.sgml
===================================================================
RCS file: /cvsroot/pgsql-server/doc/src/sgml/libpq.sgml,v
retrieving revision 1.114
diff -c -c -r1.114 libpq.sgml
*** doc/src/sgml/libpq.sgml	22 Mar 2003 03:29:05 -0000	1.114
--- doc/src/sgml/libpq.sgml	24 Mar 2003 18:21:08 -0000
***************
*** 857,867 ****
  maintain the <structname>PGresult</structname> abstraction.  Use the accessor functions below to get
  at the contents of <structname>PGresult</structname>.  Avoid directly referencing the fields of the
  <structname>PGresult</structname> structure because they are subject to change in the future.
! (Beginning in <productname>PostgreSQL</productname> 6.4, the
! definition of <type>struct</> behind <structname>PGresult</> is not even provided in <filename>libpq-fe.h</>.  If you
! have old code that accesses <structname>PGresult</structname> fields directly, you can keep using it
! by including <filename>libpq-int.h</filename> too, but you are encouraged to fix the code
! soon.)
  </para>
  
  <variablelist>
--- 857,864 ----
  maintain the <structname>PGresult</structname> abstraction.  Use the accessor functions below to get
  at the contents of <structname>PGresult</structname>.  Avoid directly referencing the fields of the
  <structname>PGresult</structname> structure because they are subject to change in the future.
! If <quote>autocommit</quote> is on, multiple queries sent in a single
! function call are processed in a single transaction.
  </para>
  
  <variablelist>
Index: doc/src/sgml/ref/psql-ref.sgml
===================================================================
RCS file: /cvsroot/pgsql-server/doc/src/sgml/ref/psql-ref.sgml,v
retrieving revision 1.85
diff -c -c -r1.85 psql-ref.sgml
*** doc/src/sgml/ref/psql-ref.sgml	13 Feb 2003 05:37:43 -0000	1.85
--- doc/src/sgml/ref/psql-ref.sgml	24 Mar 2003 18:21:11 -0000
***************
*** 87,92 ****
--- 87,97 ----
        <application>psql</application>, like this: <literal>echo "\x \\
        select * from foo;" | psql</literal>.
        </para>
+       <para>
+       If <quote>autocommit</quote> is on, multiple queries in a single
+       string are processed in a single transaction.
+ 
+       </para>
        </listitem>
      </varlistentry>
  
Index: src/backend/tcop/postgres.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/tcop/postgres.c,v
retrieving revision 1.319
diff -c -c -r1.319 postgres.c
*** src/backend/tcop/postgres.c	22 Mar 2003 04:23:34 -0000	1.319
--- src/backend/tcop/postgres.c	24 Mar 2003 18:21:16 -0000
***************
*** 83,88 ****
--- 83,90 ----
  bool		Warn_restart_ready = false;
  bool		InError = false;
  
+ extern bool	autocommit;
+ 
  static bool EchoQuery = false;	/* default don't echo */
  
  /*
***************
*** 893,899 ****
  		 * historical Postgres behavior, we do not force a transaction
  		 * boundary between queries appearing in a single query string.
  		 */
! 		if (lnext(parsetree_item) == NIL && xact_started)
  		{
  			finish_xact_command(false);
  			xact_started = false;
--- 895,901 ----
  		 * historical Postgres behavior, we do not force a transaction
  		 * boundary between queries appearing in a single query string.
  		 */
! 		if ((lnext(parsetree_item) == NIL || !autocommit) && xact_started)
  		{
  			finish_xact_command(false);
  			xact_started = false;
