Bug->Req #66658 [Opn]: wrong pg_result_error() result
Edit report at https://bugs.php.net/bug.php?id=66658&edit=1
ID: 66658
Updated by: yohgaki@php.net
Reported by: tap3ahchina at gmail dot com
Summary: wrong pg_result_error() result
Status: Open
-Type: Bug
+Type: Feature/Change Request
Package: PostgreSQL related
Operating System: Fedora Linux 3.12.9-301.fc20.x86
PHP Version: 5.5.9
-Assigned To:
+Assigned To: yohgaki
Block user comment: N
Private report: N
New Comment:
I'm not sure if we should change this behavior. Anyone have good reason for it?
Previous Comments:
------------------------------------------------------------------------
[2014-02-07 09:10:00] tap3ahchina at gmail dot com
Description:
------------
Build: PHP 5.5.8 (cli) (built: Jan 9 2014 08:33:30)
Documentation for pg_result_error states:
"Returns a string if there is an error associated with the result parameter, FALSE
otherwise."
but empty String ("") is returned.
Test script:
---------------
$conn = pg_pconnect("host=... port=5432 dbname=myDB user='postgres'
password='...'");
pg_send_query($conn, "SELECT count(*) FROM existingTable;");
$ress = pg_get_result($conn);
$errmsg = pg_result_error($ress);
var_dump($errmsg);
Expected result:
----------------
bool(false)
Actual result:
--------------
string(0) ""
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66658&edit=1
Thread (3 messages)