Inconsistent PHP pg_result_error_field PGSQL_DIAG_SOURCE_FUNCTION across instalations - Mailing list pgsql-bugs

From IP
Subject Inconsistent PHP pg_result_error_field PGSQL_DIAG_SOURCE_FUNCTION across instalations
Date
Msg-id 93F94B7AC96B4645A1998F478C5D5DF1@test
Whole thread Raw
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #5304: psql using conninfo fails in connecting to the server
Next
From: "John"
Date:
Subject: BUG #5311: Won't install.