pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feedPHP die but PG doesnt have roolbacked the transaction
2+ messages / 2 participants
[nested] [flat]
* PHP die but PG doesnt have roolbacked the transaction
@ 2002-04-16 23:21 Miguel Carvalho <miguel@ipatimup.pt>
2002-04-17 10:47 ` Re: PHP die but PG doesnt have roolbacked the transaction Andrew McMillan <andrew@catalyst.net.nz>
0 siblings, 1 reply; 2+ messages in thread
From: Miguel Carvalho @ 2002-04-16 23:21 UTC (permalink / raw)
To: pgsql-php
Hi,
for the subject you are seeing what is my problem, but i will give some
more info.
PHP version: 4.1.2
OS: Linux, Suse 7
PG version: 7.1.2
A PHP script has die with an error( a typo ) saying something like this:
missing parameter 1 for funcion my_function ...
As far as i know, when a connection to a database is lost( i use pg_connect
) and the database server is executing in NOT auto commit mode( using
transactions ), the transaction is roolbacked enterely. Isnt this right?
Question: Why does the transaction doesnt got roobacked?
Is this a bug in PHP?
Is this a bug in PG?
Regards
Miguel Carvalho
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: PHP die but PG doesnt have roolbacked the transaction
2002-04-16 23:21 PHP die but PG doesnt have roolbacked the transaction Miguel Carvalho <miguel@ipatimup.pt>
@ 2002-04-17 10:47 ` Andrew McMillan <andrew@catalyst.net.nz>
0 siblings, 0 replies; 2+ messages in thread
From: Andrew McMillan @ 2002-04-17 10:47 UTC (permalink / raw)
To: miguel@ipatimup.pt; +Cc: pgsql-php
On Wed, 2002-04-17 at 11:21, Miguel Carvalho wrote:
> Hi,
>
> for the subject you are seeing what is my problem, but i will give some
> more info.
>
> PHP version: 4.1.2
> OS: Linux, Suse 7
> PG version: 7.1.2
>
> A PHP script has die with an error( a typo ) saying something like this:
>
> missing parameter 1 for funcion my_function ...
>
> As far as i know, when a connection to a database is lost( i use pg_connect
> ) and the database server is executing in NOT auto commit mode( using
> transactions ), the transaction is roolbacked enterely. Isnt this right?
>
> Question: Why does the transaction doesnt got roobacked?
>
> Is this a bug in PHP?
> Is this a bug in PG?
I'm betting that the error is in your script, although there are PG
versions quite a lot newer than that one (7.2.1 is current).
How do you specify 'not autocommit mode' within your script?
In my PHP programs I explicitly do a "BEGIN" when I want a transaction
to start, and a "COMMIT" when I want it to end (or "ROLLBACK", of
course).
If I don't use a BEGIN, then each statement will be committed straight
away. I am not attempting to turn off auto-commit at all, but
transaction scoping does work correctly. Perhaps you could work around
by leaving everything at it's defaults and explicitly scoping the
transaction?
Regards,
Andrew.
--
--------------------------------------------------------------------
Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington
WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St
DDI: +64(4)916-7201 MOB: +64(21)635-694 OFFICE: +64(4)499-2267
Are you enrolled at http://schoolreunions.co.nz/ yet?
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2002-04-17 10:47 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-04-16 23:21 PHP die but PG doesnt have roolbacked the transaction Miguel Carvalho <miguel@ipatimup.pt>
2002-04-17 10:47 ` Andrew McMillan <andrew@catalyst.net.nz>
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