pgsql: Fix libpq so that it reports PGRES_EMPTY_QUERY not

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix libpq so that it reports PGRES_EMPTY_QUERY not
Date: 2009-01-09 18:50:03
Message-ID: 20090109185003.6C2CA754A1B@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
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.

Modified Files:
--------------
pgsql/src/interfaces/libpq:
fe-protocol3.c (r1.37 -> r1.38)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/libpq/fe-protocol3.c?r1=1.37&r2=1.38)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2009-01-09 19:27:14 pgsql: A further attempt at clarifying the \distv business.
Previous Message Tom Lane 2009-01-09 15:46:11 pgsql: Arrange for function default arguments to be processed properly