Re: [HACKERS] quoting problem?

Поиск
Список
Период
Сортировка
От Thomas G. Lockhart
Тема Re: [HACKERS] quoting problem?
Дата
Msg-id 3641BF1A.515B95C0@alumni.caltech.edu
обсуждение исходный текст
Ответ на quoting problem?  (Terry Mackintosh <terry@terrym.com>)
Список pgsql-hackers
> REVOKE ALL on 'board' from PUBLIC;
> ERROR:  parser: parse error at or near "'"
> GRANT ALL on "board" to "nobody";
> CHANGE
> It would seem that the single quotes should be double quotes?

It looks like that is now correct in the v6.4beta and v6.4final trees.
The program uses a single function, FmtId(), to evaluate strings and to
do the quote/noquote thang.

> I have notice that most all names now are quoted in dumps, but will 
> work just fine with out any quotes, so why the quotes?

The primary reason that is that you are allowed on table creation to use
reserved keywords if you surround them with double quotes. pg_dump
doesn't know about reserved words, so would not be able to selectively
apply double quotes.

You can suppress most of the double quotes by using the new "-n"
argument to pg_dump (n == no quotes). This gives you essentially the old
behavior of applying double quotes only if there is upper case or
whitespace in the identifier.
                 - Tom


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

Предыдущее
От: "Thomas G. Lockhart"
Дата:
Сообщение: Re: [HACKERS] Open the flood gates...v6.4 is tag'd...
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Open the flood gates...v6.4 is tag'd...