Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aVmBQ-0002fS-L6 for pgsql-bugs@arkaria.postgresql.org; Tue, 16 Feb 2016 20:25:16 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aVmBP-0007NE-Ne for pgsql-bugs@arkaria.postgresql.org; Tue, 16 Feb 2016 20:25:15 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aVmAm-0006d1-W7 for pgsql-bugs@postgresql.org; Tue, 16 Feb 2016 20:24:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aVmAk-0000XQ-2r; Tue, 16 Feb 2016 20:24:35 +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 u1GKOOSN012471; Tue, 16 Feb 2016 15:24:24 -0500 From: Tom Lane To: Bruce Momjian cc: Jim Nasby , Jan Lentfer , Tatsuo Ishii , pgsql-bugs@postgresql.org Subject: Re: Encoding problems with "COMMENT ON DATABASE .." causing pg_restore (and pg_upgrade) to fail In-reply-to: <20160216200614.GI31273@momjian.us> References: <666abab3fe03561c77dbfc661b023985@neslonek.homeunix.org> <20160127.094510.1792875178673024937.t-ishii@sraoss.co.jp> <20160216163833.GF31273@momjian.us> <56C37A38.6060007@BlueTreble.com> <20160216200614.GI31273@momjian.us> Comments: In-reply-to Bruce Momjian message dated "Tue, 16 Feb 2016 15:06:14 -0500" Date: Tue, 16 Feb 2016 15:24:24 -0500 Message-ID: <12470.1455654264@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: > On Tue, Feb 16, 2016 at 01:36:24PM -0600, Jim Nasby wrote: >> Could we force the global catalogs to always be accessed via UTF8, >> at least for modification? I suspect that would mean changing >> encodings on the fly in the appropriate command functions (such as >> what's listed in src/include/commands/user.h). > I don't remember us favoring UTF8 in this way in the past. Yeah. I'm pretty sure the Far Eastern contingent has specifically lobbied against giving UTF8 such a preference. Also, if a name in the shared catalog is UTF8, what do you do when it cannot be converted to the local database encoding? I don't think pretending the entry isn't there will do. Perhaps a reasonable thing for now is to document that it's a bad idea to put non-ASCII characters in names or comments of shared objects (databases, roles, tablespaces) unless all databases of the cluster share the same encoding. I don't know if it would be useful/practical to try to mechanically enforce such a rule, but we could at least warn people about the issue. 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