Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WROKT-0008S2-Il for pgsql-bugs@arkaria.postgresql.org; Sat, 22 Mar 2014 15:59:25 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WROKT-0005Ov-2Q for pgsql-bugs@arkaria.postgresql.org; Sat, 22 Mar 2014 15:59:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WROKS-0005Oo-1Y for pgsql-bugs@postgresql.org; Sat, 22 Mar 2014 15:59:24 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WROKP-0007ce-8W; Sat, 22 Mar 2014 15:59:23 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s2MFxDeK019856; Sat, 22 Mar 2014 11:59:13 -0400 From: Tom Lane To: Bruce Momjian cc: Tatsuo Ishii , pg@heroku.com, pgsql-bugs@postgresql.org Subject: Re: PQclientEncoding() returns -1, resulting in possible assertion failure in psql In-reply-to: <20140322155505.GA17107@momjian.us> References: <14465.1386526658@sss.pgh.pa.us> <15210.1386529004@sss.pgh.pa.us> <20131209.081735.1321847791044178990.t-ishii@sraoss.co.jp> <20140322015325.GA21843@momjian.us> <20140322151723.GB21843@momjian.us> <20140322155505.GA17107@momjian.us> Comments: In-reply-to Bruce Momjian message dated "Sat, 22 Mar 2014 11:55:05 -0400" Date: Sat, 22 Mar 2014 11:59:13 -0400 Message-ID: <19855.1395503953@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Bruce Momjian 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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs