Re: PQclientEncoding() returns -1, resulting in possible assertion failure in psql

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tatsuo Ishii <ishii(at)postgresql(dot)org>, pg(at)heroku(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: PQclientEncoding() returns -1, resulting in possible assertion failure in psql
Date: 2014-03-22 15:59:13
Message-ID: 19855.1395503953@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Bruce Momjian <bruce(at)momjian(dot)us> writes:
> Also, what is the difference between _PG_LAST_ENCODING_, which is the
> last encoding enum, and the pg_wchar_tbl length calculation? Are they
> the same?

They certainly should be; I don't think it's the responsibility of these
functions to defend against them not being so.

> If so, we should just use _PG_LAST_ENCODING_.

Well, we should use PG_VALID_ENCODING() imo.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2014-03-23 00:17:11 Re: PQclientEncoding() returns -1, resulting in possible assertion failure in psql
Previous Message Tom Lane 2014-03-22 15:55:56 Re: PQclientEncoding() returns -1, resulting in possible assertion failure in psql