Thread: Inconsistent PHP pg_result_error_field PGSQL_DIAG_SOURCE_FUNCTION across instalations
Inconsistent PHP pg_result_error_field PGSQL_DIAG_SOURCE_FUNCTION across instalations
From
"IP"
Date:
PHP Script: <?php if($c =3D pg_connect("host=3D192.168.0.10 dbname=3Dxxx user=3Dxxx password= =3Dxxx port=3D5432")) { echo "Successfully connected to PostgreSQL 8.4.2 by Enterprise DB @ Windows= Vista x86<br>"; $s =3D "DROP TABLE t123;"; // table doesn't exist pg_send_query($c, $s); $r =3D pg_get_result($c); echo "Source function: " . pg_result_error_field($r, PGSQL_DIAG_SOURCE_FUNC= TION) . "<br><br>";=20 pg_close($c); } if($c =3D pg_connect("host=3D192.168.0.60 dbname=3Dxxx user=3Dxxx password= =3Dxxx port=3D5432")) { echo "Successfully connected to PostgreSQL 8.4.2 (installed from package) @= Sun Solaris 10 x86<br>"; $s =3D "DROP TABLE t123;"; // table doesn't exist pg_send_query($c, $s); $r =3D pg_get_result($c); echo "Source function: " . pg_result_error_field($r, PGSQL_DIAG_SOURCE_FUNC= TION) . "<br><br>";=20 pg_close($c); } if($c =3D pg_connect("host=3D192.168.0.60 dbname=3Dxxx user=3Dxxx password= =3Dxxx port=3D5431")) { echo "Successfully connected to PostgreSQL 8.5alpha3 (installed from source= ) @ Sun Solaris 10 x86<br>"; $s =3D "DROP TABLE t123;"; // table doesn't exist pg_send_query($c, $s); $r =3D pg_get_result($c); echo "Source function: " . pg_result_error_field($r, PGSQL_DIAG_SOURCE_FUNC= TION) . "<br><br>";=20 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 S= olaris 10 x86 Source function:=20 Successfully connected to PostgreSQL 8.5alpha3 (installed from source) @ Su= n Solaris 10 x86 Source function: DropErrorMsgNonExistent ############################################### Issue: no value returned for 8.4.2 Solaris 10 x86 installation