Query: pg_last_notice
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
PG_LAST_NOTICE(3) PG_LAST_NOTICE(3) pg_last_notice - Returns the last notice message from PostgreSQL serverSYNOPSISstring pg_last_notice (resource $connection)DESCRIPTIONpg_last_notice(3) returns the last notice message from the PostgreSQL server on the specified $connection. The PostgreSQL server sends notice messages in several cases, for instance when creating a SERIAL column in a table. With pg_last_notice(3), you can avoid issuing useless queries by checking whether or not the notice is related to your transaction. Notice message tracking can be set to optional by setting 1 for pgsql.ignore_notice in php.ini. Notice message logging can be set to optional by setting 0 for pgsql.log_notice in php.ini. Unless pgsql.ignore_notice is set to 0, notice message cannot be logged.PARAMETERSo $connection - PostgreSQL database connection resource.RETURN VALUESA string containing the last notice on the given $connection, or FALSE on error.CHANGELOG+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 4.3.0 | | | | | | | This function is now fully implemented. Earlier | | | versions ignores database connection parameter. | | | | | 4.3.0 | | | | | | | The pgsql.ignore_notice and pgsql.log_notice | | | php.ini directives were added. | | | | | 4.0.6 | | | | | | | PHP 4.0.6 has problem with notice message han- | | | dling. Use of the PostgreSQL module with PHP | | | 4.0.6 is not recommended even if you are not | | | using pg_last_notice(3). | | | | +--------+---------------------------------------------------+EXAMPLESExample #1 pg_last_notice(3) example <?php $pgsql_conn = pg_connect("dbname=mark host=localhost"); $res = pg_query("CREATE TABLE test (id SERIAL)"); $notice = pg_last_notice($pgsql_conn); echo $notice; ?> The above example will output: CREATE TABLE will create implicit sequence "test_id_seq" for "serial" column "test.id"SEE ALSOpg_query(3), pg_last_error(3). PHP Documentation Group PG_LAST_NOTICE(3)
Related Man Pages |
---|
pg_last_notice(3) - php |
pg_connect(3) - php |
pg_lo_seek(3) - php |
pg_send_query(3) - php |
pg_set_client_encoding(3) - php |
Similar Topics in the Unix Linux Community |
---|
php-residence 1.1 (Default branch) |
php-residence 1.1.1 (Default branch) |
about php.ini and mysql linux |
php.ini |
Opcache settings (initial) |