From: Bruce Momjian <bruce@momjian.us>
To: Tatsuo Ishii <ishii@postgresql.org>
Cc: tgl@sss.pgh.pa.us
Cc: pg@heroku.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: PQclientEncoding() returns -1, resulting in possible assertion failure in psql
Date: Fri, 21 Mar 2014 21:53:25 -0400
Message-ID: <20140322015325.GA21843@momjian.us> (raw)
In-Reply-To: <20131209.081735.1321847791044178990.t-ishii@sraoss.co.jp>
References: <CAM3SWZSU2XSb0cKDreoQnMSge7xN5q32XNC3LE0wfuke-V9BRQ@mail.gmail.com>
<14465.1386526658@sss.pgh.pa.us>
<15210.1386529004@sss.pgh.pa.us>
<20131209.081735.1321847791044178990.t-ishii@sraoss.co.jp>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
On Mon, Dec 9, 2013 at 08:17:35AM +0900, Tatsuo Ishii wrote:
> > branches. I would argue however that the documentation nowhere
> > suggests that PQclientEncoding can return a bogus encoding ID,
> > so this is more likely to be a bug fix than a new bug for other
> > programs as well. Also, it looks to me like there are probably
>
> This sounds like a little bit unfair argument. The libpq documentation
> is pretty sloppy for the error case for other PQ* as well. For
> example, look at the PQdb document:
>
> PQdb
> Returns the database name of the connection.
> char *PQdb(const PGconn *conn);
>
> This says nothing about when the connection is bad. Reality is PQdb
> returns NULL in the case. But are we allowed to change PQdb returns
> say, "template1" when the connection is bad because the doc says
> nothing about error case?
So, what did we decide on this? Should we document the -1 return, or
return SQL_ASCII.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: bruce@momjian.us, ishii@postgresql.org, tgl@sss.pgh.pa.us, pg@heroku.com
Subject: Re: PQclientEncoding() returns -1, resulting in possible assertion failure in psql
In-Reply-To: <20140322015325.GA21843@momjian.us>
References: <CAM3SWZSU2XSb0cKDreoQnMSge7xN5q32XNC3LE0wfuke-V9BRQ@mail.gmail.com> <14465.1386526658@sss.pgh.pa.us> <15210.1386529004@sss.pgh.pa.us> <20131209.081735.1321847791044178990.t-ishii@sraoss.co.jp> <20140322015325.GA21843@momjian.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox