PostgreSQL PHP & Error handling - Mailing list pgsql-general

From Ben-Nes Michael
Subject PostgreSQL PHP & Error handling
Date
Msg-id 01d901c30b14$c682d3e0$aa0f5ac2@canaan.co.il
Whole thread Raw
List pgsql-general
Hi All

Continuing my research of Serializable transaction I wanted to conduct a
test of running two querys expecting that the second query will return:
"ERROR:  Can't serialize access due to concurrent update"

The only way I could check what is the last error was pg_last_error( $conn )
while it seems that pg_result_error( $res ) & pg_result_status( $res )
should be more reliable as they use the query result resource.

But the main problem is that pg_query() return false on error so I cant use
the returned value what make the little useless :(

any one know some other way to intercept errors ?

--------------------------
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
Fax: 972-4-6990098
http://sites.canaan.co.il
--------------------------


pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Help with a query
Next
From: Mark Kirkwood
Date:
Subject: Re: Solaris