Re: Postgres auto-commit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Skippy <skippy@xxxxxxxxxx>:
> How can I disable auto-commit for a Postgres connection? Apparently
> server-side autocommit was thrown out in Postgres 8.0, and clients have to
> issue their own setting (which is sensible).

Apparently this will work (or at least it will be accepted by pg_connect):

$conn = pg_connect("dbname=test host=localhost user=postgres options='-c
AUTOCOMMIT=true'");

Warning: it fails if you use values other than those that will set it to true
(true, on, 1). Apparently you can't use false, off, 0. But I've noticed you
can leave the value empty:

$conn = pg_connect("dbname=test host=localhost user=postgres options='-c
AUTOCOMMIT='");

Hopefully, this has the "off" effect. Will have to test more.


-- 
Romanian Web Developers - http://ROWD.ORG

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux