Skip site navigation (1) Skip section navigation (2)

Re: Quoting of psql \d output

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, chriskl(at)familyhealth(dot)com(dot)au,pgsql-patches(at)postgresql(dot)org
Subject: Re: Quoting of psql \d output
Date: 2003-12-27 18:13:55
Message-ID: 12610.1072548835@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> So it seems we can either go with no quotes, or smart quotes (which my
> patch implemented).   I feel my patch does the best of both worlds, by
> quoting as needed, and as the psql \d commands actually require anyway,
> and as used by pg_dump and in SQL queries.

You have not responded to Peter's point that quotes need translation.

If we adopt the viewpoint that this is an SQL representation of the
table name, and not a human-oriented one, then double quotes are correct
regardless of the language in use.  However, we agreed during
development of the message style guidelines that we would *not* use
strict SQL quoting in messages.  I have not seen a good reason given
to ignore that general policy in this particular case.

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.

At this point I think I'm voting with Peter, for no change at all.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2003-12-27 18:26:28
Subject: Re: Quoting of psql \d output
Previous:From: Randal L. SchwartzDate: 2003-12-27 17:51:32
Subject: Re: Is my MySQL Gaining ?

pgsql-patches by date

Next:From: Bruce MomjianDate: 2003-12-27 18:26:28
Subject: Re: Quoting of psql \d output
Previous:From: ohpDate: 2003-12-27 16:56:03
Subject: Re: [PATCHES] update i386 spinlock for hyperthreading

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group