#18747 [NEW]: pg_result_error is complete useless
From: vincent@sunlight.tmfweb.nl
Operating system: Linux
PHP version: 4.2.2
PHP Bug Type: PostgreSQL related
Bug description: pg_result_error is complete useless
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 bug report at http://bugs.php.net/?id=18747&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=18747&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=18747&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=18747&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=18747&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=18747&r=support
Expected behavior: http://bugs.php.net/fix.php?id=18747&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=18747&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=18747&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=18747&r=globals
Thread (2 messages)
- vincent at sunlight dot tmfweb dot nl