pg_last_notice

(PHP 4 >= 4.0.6)

pg_last_notice --  Returns the last notice message from PostgreSQL server

Description

string pg_last_notice ( resource connection)

pg_last_notice() returns the last notice message from the PostgreSQL server specified by connection. The PostgreSQL server sends notice messages in several cases, e.g. if the transactions can't be continued. With pg_last_notice(), you can avoid issuing useless queries, by checking whether the notice is related to the transaction or not.

Varovßnφ

This function is EXPERIMENTAL and it is not fully implemented yet. pg_last_notice() was added in PHP 4.0.6. However, PHP 4.0.6 has problem with notice message handling. Use of the PostgreSQL module with PHP 4.0.6 is not recommended even if you are not using pg_last_notice().

See also pg_exec() and pg_errormessage().