Req #66658 [Asn]: wrong pg_result_error() result

From: Date: Thu, 13 Mar 2014 18:20:18 +0000
Subject: Req #66658 [Asn]: wrong pg_result_error() result
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-184779@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66658&edit=1 ID: 66658 User updated by: tap3ahchina at gmail dot com Reported by: tap3ahchina at gmail dot com Summary: wrong pg_result_error() result Status: Assigned Type: Feature/Change Request Package: PostgreSQL related Operating System: Fedora Linux 3.12.9-301.fc20.x86 PHP Version: 5.5.9 Assigned To: yohgaki Block user comment: N Private report: N New Comment: No reason really. Documentation is incorrect, that's all. Change either behavior or documentation. Previous Comments: ------------------------------------------------------------------------ [2014-03-11 03:16:44] yohgaki@php.net I'm not sure if we should change this behavior. Anyone have good reason for it? ------------------------------------------------------------------------ [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

« previous php.bugs (#184779) next »