PHP Script: <?php
if($c = pg_connect("host=192.168.0.10 dbname=xxx user=xxx password=xxx port=5432")) { echo "Successfully connected to PostgreSQL 8.4.2 by Enterprise DB @ Windows Vista x86<br>"; $s = "DROP TABLE t123;"; // table doesn't exist pg_send_query($c, $s); $r = pg_get_result($c); echo "Source function: " . pg_result_error_field($r, PGSQL_DIAG_SOURCE_FUNCTION) . "<br><br>"; pg_close($c); } if($c = pg_connect("host=192.168.0.60 dbname=xxx user=xxx password=xxx port=5432")) { echo "Successfully connected to PostgreSQL 8.4.2 (installed from package) @ Sun Solaris 10 x86<br>"; $s = "DROP TABLE t123;"; // table doesn't exist pg_send_query($c, $s); $r = pg_get_result($c); echo "Source function: " . pg_result_error_field($r, PGSQL_DIAG_SOURCE_FUNCTION) . "<br><br>"; pg_close($c); } if($c = pg_connect("host=192.168.0.60 dbname=xxx user=xxx password=xxx port=5431")) { echo "Successfully connected to PostgreSQL 8.5alpha3 (installed from source) @ Sun Solaris 10 x86<br>"; $s = "DROP TABLE t123;"; // table doesn't exist pg_send_query($c, $s); $r = pg_get_result($c); echo "Source function: " . pg_result_error_field($r, PGSQL_DIAG_SOURCE_FUNCTION) . "<br><br>"; pg_close($c); } ?> ############################################### Output: Successfully connected to PostgreSQL 8.4.2 by Enterprise DB @ Windows Vista x86 Source function: DropErrorMsgNonExistent Successfully connected to PostgreSQL 8.4.2 (installed from package) @ Sun Solaris 10 x86 Source function: Successfully connected to PostgreSQL 8.5alpha3 (installed from source) @ Sun Solaris 10 x86 Source function: DropErrorMsgNonExistent ############################################### Issue: no value returned for 8.4.2 Solaris 10 x86 installation