Re: Quoting of psql \d output

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: chriskl(at)familyhealth(dot)com(dot)au, pgsql-patches(at)postgresql(dot)org
Subject: Re: Quoting of psql \d output
Date: 2004-01-04 18:41:24
Message-ID: 200401041941.24317.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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.)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2004-01-04 18:51:15 Re: [HACKERS] Spinlock support for linux-hppa?
Previous Message Peter Eisentraut 2004-01-04 18:17:59 Re: [COMMITTERS] pgsql-server/doc/src/sgml Tag: REL7_4_STABLE r ...

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-01-05 05:47:52 Re: [COMMITTERS] pgsql-server/ oc/src/sgml/datatype.sgml
Previous Message Peter Eisentraut 2004-01-04 17:29:39 Re: psql \i handling ~ in specified file name