Tom Lane wrote:
> I think if we change it here we will also have to revisit hundreds of
> places in the backend, such as this one:
> regression=# select * from public.bar;
> ERROR: relation "public.bar" does not exist
> and indeed the whole question of what we are using quotes for in
> messages becomes open again.
I remember someone once posted Oracle's message style guidelines, and
they actually specify that you are not supposed to write 'foo.bar' in
messages, but you are supposed to write 'schema foo, table bar' or some
permutation.
Personally, I like this rule, but it seems prohibitively hard and/or
cumbersome to implement it everywhere in an i18n-safe way. But we
might want to use it when it's easily possible.
The alternative is using the dotted notation, and in that case we should
use SQL quotation rules because that is the only way to be internally
consistent. (Smart quotation or full quotation is another matter.) In
that case the generated string falls under the "already supplies its
own quotes" rule and the outer format string should not put the %s in
quotes again.
(Yes, that means that psql should be changed somehow.)