You are here: Re: [PHP] Postgres auto-commit « PHP « IT news, forums, messages
Re: [PHP] Postgres auto-commit

Posted by Skippy on 10/21/67 11:28

Quoting Skippy <skippy@zuavra.net>:
> 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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация