pg_result_error

(PHP 4 >= 4.2.0, PHP 5)

pg_result_error --  Get error message associated with result

Description

string pg_result_error ( resource result)

pg_result_error() returns error message associated with result resource. Therefore, user has better chance to get better error message than pg_last_error().

Because pg_query() returns FALSE if the query fails, you must use pg_send_query() and pg_get_result() to get the result handle.

See also pg_query(), pg_send_query(), pg_get_result(), pg_last_error() and pg_last_notice()