php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #14113 transaction / postgres backend
Submitted: 2001-11-19 06:18 UTC Modified: 2001-12-19 08:45 UTC
From: n dot dose at leo-media dot de Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.6 OS: linux (suse)
Private report: No CVE-ID: None
 [2001-11-19 06:18 UTC] n dot dose at leo-media dot de
If I commit a transaction, if it is succesfully executed or not is not communicated: a pg_exec($conn, "commit") will always return TRUE, since the "commit" command itself is succesfully carried out (tho maybe each item in the transaction is not!)

if there were some way to see if you were in
*ABORT STATE*
(what you would see in the backend in fouled-up transactions), that would solve everything.

Or: generally, it would be useful in some scenarios to be able to obtain messages from the backend.  There is already a pg_errormessage() function.  Why not a pg_message() function?  This would also solve my problem.

thanks a bunch, otherwise i am a very happy customer!
Nathaniel Dose

ps: "features" is misspelled as "fatures" when you click the "+" button to insert user notes into the online documentation.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-19 18:25 UTC] sniper@php.net
There is this (undocumented) function:

pg_last_notice()

Which returns the last notice set by backend.
Does this do what you need?  (I don't know about postgresql
so much. :)

Also note that  you should update your PHP to 4.1.0 as soon 
as it is released since there was a serious bug in this 
which caused segfaults.

You can find the latest RC from:

http://download.php.net/~zeev/php-4.1.0RC3.tar.gz

--Jani

 [2001-12-19 08:45 UTC] sander@php.net
No feedback. Closing.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 07:01:28 2025 UTC