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 PGresult abstraction. Use the accessor functions below to get at the contents of PGresult. Avoid directly referencing the fields of the PGresult structure because they are subject to change in the future. ! (Beginning in PostgreSQL 6.4, the ! definition of struct behind PGresult is not even provided in libpq-fe.h. If you ! have old code that accesses PGresult fields directly, you can keep using it ! by including libpq-int.h too, but you are encouraged to fix the code ! soon.) --- 857,864 ---- maintain the PGresult abstraction. Use the accessor functions below to get at the contents of PGresult. Avoid directly referencing the fields of the PGresult structure because they are subject to change in the future. ! If autocommit is on, multiple queries sent in a single ! function call are processed in a single transaction. 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 ---- psql, like this: echo "\x \\ select * from foo;" | psql. + + If autocommit is on, multiple queries in a single + string are processed in a single transaction. + + 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;