<?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"