Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j4RX8-0000zO-T7 for pgsql-bugs@arkaria.postgresql.org; Wed, 19 Feb 2020 15:45:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j4RX7-0002nq-O2 for pgsql-bugs@arkaria.postgresql.org; Wed, 19 Feb 2020 15:45:05 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j4RX7-0002nV-CX for pgsql-bugs@lists.postgresql.org; Wed, 19 Feb 2020 15:45:05 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j4RWx-0004hG-D8 for pgsql-bugs@lists.postgresql.org; Wed, 19 Feb 2020 15:45:00 +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 01JFin8S018666; Wed, 19 Feb 2020 10:44:49 -0500 From: Tom Lane To: jltallon@adv-solutions.net cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16265: psql shows (unfolded) relation name in quotes In-reply-to: <16265-222897d24189e4d9@postgresql.org> References: <16265-222897d24189e4d9@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Wed, 19 Feb 2020 01:17:22 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <18664.1582127089.1@sss.pgh.pa.us> Date: Wed, 19 Feb 2020 10:44:49 -0500 Message-ID: <18665.1582127089@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Bug reporting form writes: > ------------------- > test=> \d+ Schedule > Did not find any relation named "Schedule". > ------------------- > EXPECTED: > ------------------- > test=> \d+ Schedule > Did not find any relation named "schedule". > ------------------- Yeah, it just reports what you typed. The difficulty in doing differently is that what you typed might not be *meant* to be interpreted literally, because it's a pattern not a simple name. What should we do for example with regression=# \d+ foo* Did not find any relation named "foo*". A more interesting example, perhaps, is that these don't mean the same thing: regression=# \d+ "Foo*" Did not find any relation named ""Foo*"". regression=# \d+ "Foo"* Did not find any relation named ""Foo"*". (If I had a table named "Foot", the first case wouldn't find it but the second would.) I'm not clear on how we could report a post-processed version of the input that would distinguish these in a non-confusing way. Part of the issue is that the double-quote characters are being used in two different ways. The ones that the error message is wrapping around the regurgitated input are not to be confused with quotes used in the input; they're just there to separate the fixed and variable parts of the message. This is a little easier to follow in some other languages where different quoting characters are used in error messages, but in English we've concluded we just have to live with it. tl;dr: it's not that obvious what would be an improvement here. regards, tom lane