ID: 26592 Updated by: [EMAIL PROTECTED] Reported By: aspire420 at hotpop dot com -Status: Open +Status: Feedback Bug Type: PostgreSQL related Operating System: Linux RH 9.0 PHP Version: 4.3.4 New Comment:
I'm really not Postgresql expert (never used it actually :), but according to this documentation: http://www.postgresql.org/docs/7.4/static/sql-begin.html "By default (without BEGIN), PostgreSQL executes transactions in "autocommit" mode..." So if I understood that correctly, to turn it off you just need to begin your queries with 'BEGIN' and end with 'COMMIT' to "disable" autocommit? Now why would you need yet another php.ini option for this?! Previous Comments: ------------------------------------------------------------------------ [2003-12-11 17:31:12] scott dot marlowe at ihs dot com QUOTE: What if my app has a multi-request series of action that should succeed or fail as a group? UNQUOTE: Then you need to enclose them in begin;/end; pairs. Simple enough. ------------------------------------------------------------------------ [2003-12-11 17:22:59] not at anumber dot com Autocommit considered harmful. The consumers of database resources within an application server should decide how transactional behaviour works, not the application server itself. This is analogous to the rule (now, too frequently broken) that MTAs should not mess with message bodies. What if my app has a multi-request series of action that should succeed or fail as a group? ------------------------------------------------------------------------ [2003-12-11 17:14:02] peter_e at gmx dot net This is actually a pretty bad idea. The autocommit setting should be controlled either by making it fixed at on or off for the interface, or by the client program itself (e.g., a "set autocommit on" function), but not by a global setting, because then you'll never be able to reconcile various prepackaged PHP applications. The excessive global-ness was the reason that the server-side autocommit setting was removed in the first place. ------------------------------------------------------------------------ [2003-12-11 16:37:03] aspire420 at hotpop dot com some configuration string would be better ------------------------------------------------------------------------ [2003-12-11 16:22:01] aspire420 at hotpop dot com Description: ------------ As on PostgreSQL version 7.4 the autocommit option has been rested upon the client side i.e if I would like to put autocommit = off in PostgreSQL 7.4 > then it must appear some where in PHP.INI. But till the latest version of PHP I dont see any such option. Expected result: ---------------- in PHP.ini PostgreSQL autocommit = off or may be we do it with some configure strings ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26592&edit=1