Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1am2X7-0001J0-0h for pgsql-hackers@arkaria.postgresql.org; Fri, 01 Apr 2016 17:06:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1am2X6-0003hq-JR for pgsql-hackers@arkaria.postgresql.org; Fri, 01 Apr 2016 17:06:52 +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_2) (envelope-from ) id 1am2X4-0003cu-EH for pgsql-hackers@postgresql.org; Fri, 01 Apr 2016 17:06:50 +0000 Received: from smtp-auth.no-ip.com ([8.23.224.61] helo=out.smtp-auth.no-ip.com) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1am2X1-0005ka-13 for pgsql-hackers@postgresql.org; Fri, 01 Apr 2016 17:06:49 +0000 X-No-IP: alvh.no-ip.org@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from alvin.alvh.no-ip.org (unknown [200.83.202.40]) (Authenticated sender: alvh.no-ip.org@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id AA181400F0C; Fri, 1 Apr 2016 10:06:44 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 787FA6C4; Fri, 1 Apr 2016 14:06:42 -0300 (CLT) Date: Fri, 1 Apr 2016 14:06:42 -0300 From: Alvaro Herrera To: Tom Lane Cc: pgsql-hackers@postgresql.org Subject: Re: [COMMITTERS] pgsql: Improve internationalization of messages involving type names Message-ID: <20160401170642.GA57509@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <30101.1459529030@sss.pgh.pa.us> User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -1.1 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Moving to -hackers. Tom Lane wrote: > Alvaro Herrera writes: > > Alvaro Herrera wrote: > >> Tom Lane wrote: > >>> Actually, I think the general convention is to NOT quote type names > >>> in error messages. > > >> Ok, I'll change it. > > > Done. > > Thanks. Should we make a push to get rid of hard-wired type names in > other messages? There's still quite a few "invalid input syntax for ..." > instances that could be whacked until they all share the same translatable > message. Ah, I hadn't noticed those precisely because they lack the quotes ... I grepped for 'type \"%' and found a few matches but didn't seem interesting enough since there's only one of each, such as errmsg("constant of the type \"regrole\" cannot be used here") The 'invalid input syntax' are much more numerous. Also the "value XYZ is out of range" messages. Both of those seem definitely worth fixing. I also saw "value too long" for char/varchar but they're only two distinct messages and fixing those would require printing the maxlen in place before raising the message -- probably not worth the trouble. I also found these while paging through grep results, src/backend/utils/adt/json.c: errmsg("could not determine data type for argument 1"))); src/backend/utils/adt/json.c: errmsg("could not determine data type for argument 2"))); src/backend/utils/adt/json.c: errmsg("could not determine data type for argument %d", which seem worth merging too. If nobody opposes, I will fix those after feature freeze. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers