Fix libpq so that it reports PGRES_EMPTY_QUERY not PGRES_COMMAND_OK when an

Tom Lane <tgl@sss.pgh.pa.us>

Commit: d25ada4d7810304ee04b1f4fd9a14ad9ff0c894f
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2009-01-09T18:50:03Z
Releases: 8.4.0
Fix libpq so that it reports PGRES_EMPTY_QUERY not PGRES_COMMAND_OK when an
empty query string is passed to PQexecParams and related functions.  Its
handling of the NoData response to Describe messages was subtly incorrect.
Per my report of yesterday.

Although I consider this a bug, it's a behavioral change that might affect
applications, so not back-patched.

In passing fix a second issue in the same code: it didn't react well to an
out-of-memory failure while trying to make the PGresult object.

Files

PathChange+/−
src/interfaces/libpq/fe-protocol3.c modified +16 −11