Re: BUG #14500: error message displays "schema dot relation" in double quotes all together

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: vodevsh(at)gmail(dot)com, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14500: error message displays "schema dot relation" in double quotes all together
Date: 2017-01-17 15:35:24
Message-ID: 7406.1484667324@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> On Tue, Jan 17, 2017 at 4:09 AM, <vodevsh(at)gmail(dot)com> wrote:
>> I'm not sure if it's a bug or feature, but I find error message misleading.
>> ERROR: relation [“schema_name.table_name”] does not exist gives an
>> impression that schema name is part of relation name. Should not it be
>> ERROR: relation [“schema name”].["table_name"] does not exist instead? I
>> doubt it's a bug, because this message seems version not specific. But does
>> not it look wrong?

> More to the point, the double quotes are not part of the identifiers but
> rather offset the item being named from the rest of the sentence fragment.

Yes. In a translated message you might see something like

Relation »schema_name.table_name« existiert nicht

That is, the double quotes here are not SQL syntax but part of the human
language that the error message is written in. It's unfortunate in this
context that SQL's identifier quoting character is the same as we use in
English, because it invites confusion like the OP's. But the only way
to fix that would be to go over to non-ASCII quoting characters (curly
quotes, say) in the English message texts, and that would create tons of
practical problems. Plus, if you didn't look closely enough to see the
difference between curly quotes and plain double quotes, you'd still
be confused.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Vladimir Svedov 2017-01-17 15:38:19 Re: BUG #14500: error message displays "schema dot relation" in double quotes all together
Previous Message David G. Johnston 2017-01-17 15:33:51 Re: BUG #14500: error message displays "schema dot relation" in double quotes all together