pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: jltallon@adv-solutions.net
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16265: psql shows (unfolded) relation name in quotes
Date: Wed, 19 Feb 2020 10:44:49 -0500
Message-ID: <18665.1582127089@sss.pgh.pa.us> (raw)
In-Reply-To: <16265-222897d24189e4d9@postgresql.org>
References: <16265-222897d24189e4d9@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> 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





view thread (2+ messages)

Message-ID: <18665.1582127089@sss.pgh.pa.us>
Permalink:  ../18665.1582127089@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18665.1582127089@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jltallon@adv-solutions.net
  Subject: Re: BUG #16265: psql shows (unfolded) relation name in quotes
  In-Reply-To: <18665.1582127089@sss.pgh.pa.us>
  References: <16265-222897d24189e4d9@postgresql.org> <18665.1582127089@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox