Re: possible bug in DB/pgsql.php

From: Date: Mon, 12 Feb 2001 18:32:47 +0000
Subject: Re: possible bug in DB/pgsql.php
References: 1  Groups: php.pear 
Request: Send a blank email to php-pear+get-1328@lists.php.net to get a copy of this message
On 12 Feb 2001, at 18:20, fabrizio.ermini@sysdat.it wrote: ..replying to myself... Since I was finding difficulty to concentrate on my work this afternoon, I decided to investigate on this a little further, so I checked out CVS version. > In reality, $database->autocommit(FALSE) should have raised an > error, since it's not supported in the PGSQL port (at least in my > version)... > OK, I've seen that the CVS version doesn't complain, so this is true. In fact, this version does try to work in transaction mode, but in the wrong way, it seems. That is, it appends an explicit "COMMIT" after the query if the user chooses "autocommit" mode. The problem is, postgresql works in a opposite way to most SQL Dbs: it appends that "commit" itself, by default. If you do NOT want to do it, you have to explicitly open a transaction block with the non-standard keyword "begin". Without it, the "commit" is redundant and for this reason the backend complains the notice that Stig silenced with an "ugly hack" (his words, I would have called it "black magic" :-))... So, at the moment, DB_pgsql does only half of the work. To do it full, there should be an explicit "begin" somewhere. If this cannot be "user required" as i suggested in my previous message, the hard part is finding where... If someone feels I should speculate more on this, feel free to ask... if some other one feels like I should shut up, please be kind on me and don't roast my butt - I'm having an hell of a life lately :-( Just my 0.02 Euro Fabrizio /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ Fabrizio Ermini Alternate E-mail: C.so Umberto, 7 faermini@tin.it loc. Meleto Valdarno Mail on GSM: (keep it short!) 52020 Cavriglia (AR) faermini@sms.tin.it

« previous php.pear (#1328) next »