php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #66658 wrong pg_result_error() result
Submitted: 2014-02-07 09:10 UTC Modified: 2014-07-09 05:54 UTC
From: tap3ahchina at gmail dot com Assigned: yohgaki (profile)
Status: Closed Package: PostgreSQL related
PHP Version: 5.5.9 OS: Fedora Linux 3.12.9-301.fc20.x86
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tap3ahchina at gmail dot com
New email:
PHP Version: OS:

 

 [2014-02-07 09:10 UTC] 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) ""

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-02-27 03:40 UTC] levim@php.net
-Package: SPL related +Package: PostgreSQL related
 [2014-03-11 03:16 UTC] yohgaki@php.net
-Type: Bug +Type: Feature/Change Request -Assigned To: +Assigned To: yohgaki
 [2014-03-11 03:16 UTC] yohgaki@php.net
I'm not sure if we should change this behavior. Anyone have good reason for it?
 [2014-03-13 18:20 UTC] tap3ahchina at gmail dot com
No reason really. Documentation is incorrect, that's all. Change either behavior or documentation.
 [2014-03-15 00:44 UTC] yohgaki@php.net
-Type: Feature/Change Request +Type: Documentation Problem
 [2014-03-15 00:44 UTC] yohgaki@php.net
I didn't know documentation is wrong. Thanks.
 [2014-07-09 05:54 UTC] yohgaki@php.net
Automatic comment from SVN on behalf of yohgaki
Revision: http://svn.php.net/viewvc/?view=revision&revision=334210
Log: Fixed bug #66658
 [2014-07-09 05:54 UTC] yohgaki@php.net
-Status: Assigned +Status: Closed
 [2020-02-07 06:08 UTC] phpdocbot@php.net
Automatic comment on behalf of yohgaki
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=e8e7d86806f9c44962e6edfc22553daa57ddda87
Log: Fixed bug #66658
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 01:01:33 2025 UTC