From: Jeff MacDonald <jam@zoidtechnologies.com>
To: pgsql-php@postgresql.org
Cc: mikie <mikie.pl@gmail.com>
Cc: Jeff MacDonald <jam@zoidtechnologies.com>
Subject: Re: transactions from PHP - double COMMIT required?
Date: Thu, 1 Mar 2007 11:58:39 -0500
Message-ID: <200703011158.39438.jam@zoidtechnologies.com> (raw)
In-Reply-To: <ca35ce500703010842v193a90cavdf8052330482ee9a@mail.gmail.com>
References: <ca35ce500703010306nd06dcfcy1247fb2b4297b0c2@mail.gmail.com>
<45E6E75F.4020408@bugs.unl.edu.ar>
<ca35ce500703010842v193a90cavdf8052330482ee9a@mail.gmail.com>
On Thursday 01 March 2007 11:42 am, mikie wrote:
[..snipped..]
> Thats exactly what I was thinking, too. But PHP does things in some
> other way, I guess.
> I am sending an entire sql transaction block to the PHP pg_query
> command, so it starts with BEGIN and ends with COMMIT. Then I still
> have to execute another pg_query with "commit;" only - thats why I am
> asking here if maybe someone know what the problem is.
>
greetings,
I don't know if this will solve your problem or not, but on my
machines, "autoCommit" is set to "true" by default (using PEAR::DB).. so when
I want to do an operation that I expect to have to rollback, I turn *off*
autocommit, do my begin, run my queries, then a commit or rollback at the
end, followed by restoring autoCommit. it sounds to me like that is what is
happening.
regards,
--
Jeff MacDonald,
Zoid Technologies <http://zoidtechnologies.com/;
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: jam@zoidtechnologies.com, mikie.pl@gmail.com
Subject: Re: transactions from PHP - double COMMIT required?
In-Reply-To: <200703011158.39438.jam@zoidtechnologies.com>
References: <ca35ce500703010306nd06dcfcy1247fb2b4297b0c2@mail.gmail.com> <45E6E75F.4020408@bugs.unl.edu.ar> <ca35ce500703010842v193a90cavdf8052330482ee9a@mail.gmail.com> <200703011158.39438.jam@zoidtechnologies.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox