#18747 [Opn->Asn]: pg_result_error is complete useless

From: Date: Wed, 07 Aug 2002 07:12:12 +0000
Subject: #18747 [Opn->Asn]: pg_result_error is complete useless
References: 1  Groups: php.bugs php.doc 
Request: Send a blank email to php-bugs+get-16118@lists.php.net to get a copy of this message
 ID:               18747
 Updated by:       yohgaki@php.net
 Reported By:      vincent@sunlight.tmfweb.nl
-Status:           Open
+Status:           Assigned
-Bug Type:         PostgreSQL related
+Bug Type:         Documentation problem
 Operating System: Linux
 PHP Version:      4.2.2
-Assigned To:      
+Assigned To:      yohgaki
 New Comment:

Looks like I need to explain how it could be useful.
If you cannot wait, read libpq manual.




Previous Comments:
------------------------------------------------------------------------

[2002-08-05 17:58:17] vincent@sunlight.tmfweb.nl

The function pg_result_error() supposedly gives the error 
message for some failed SQL query after calling pg_query() 
with that query. It must be given a resource identifier of 
the result to get the error message for that result 
(sounds alright). 
 
However, function pg_query() returns FALSE if a query 
failed instead of a result identifier, so what can 
possibly be passed to pq_result_error() in this case? The 
query certainly went wrong, but there's no way to check 
exactly what, as there is no resource identifier... 
 
Almost looks like a Catch 22. 

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=18747&edit=1



Thread (2 messages)

« previous php.bugs (#16118) next »