Re: Quoting of psql \d output

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Quoting of psql \d output
Дата
Msg-id 3075.62.158.112.252.1072369524.squirrel@new.host.name
обсуждение исходный текст
Ответ на Re: Quoting of psql \d output  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-patches
Bruce Momjian writes:
> I see pg_dump using the same rules that I am proposing:

Which makes my point.

> To me quoting the table name is like quoting the name of a section
> heading (which people don't do),

The message style guidelines specify that you should always quote a %s if
it might contain characters that would cause confusion about where the
plugged-in value starts and ends, and that you quote every %s the same
way, because when the user reads the value, the user just wants to
recognize the value and does not care about whether the value might in
some context be an SQL identifier or who knows what. When you write
section titles, you know the titles ahead of time, so you don't need to
guard against confusion.

> You were suggesting no quotes at all.  Would this display be OK?
>
>     test=> \d "xx y"
>          Table public.xx y

No, that doesn't work.  Either we write it in proper SQL terms, that is

public."xx y"

or we write it in human terms, that is

Table "xx y" (Schema "public")

(or some variation).  What I'm trying to say is, since we're addressing
humans, we should use the human terms.




В списке pgsql-patches по дате отправления:

Предыдущее
От: "Peter Eisentraut"
Дата:
Сообщение: Re: Quoting of psql \d output
Следующее
От: Claudio Natoli
Дата:
Сообщение: fork/exec patch: pre-CreateProcess finalization