Fix libpq so that it reports PGRES_EMPTY_QUERY not PGRES_COMMAND_OK when an
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 9 Jan 2009 18:50:03 +0000 (18:50 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 9 Jan 2009 18:50:03 +0000 (18:50 +0000)
commitc3c179486a282343d2bd7fa729f4706666ba2e5c
tree6cd5e885fafc4b3f43cc1193161cb11aff2e1416
parent408b41ad40a731305ece2a1962d9ba8007a56cab
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.
src/interfaces/libpq/fe-protocol3.c