Re: Fwd: postgresql-autodoc - missinterprets "version"

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Fwd: postgresql-autodoc - missinterprets "version"
Дата
Msg-id 20040708065640.Q90613@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Fwd: postgresql-autodoc - missinterprets "version"  (Martin Pitt <martin@piware.de>)
Ответы Re: Fwd: postgresql-autodoc - missinterprets "version"  (Martin Pitt <martin@piware.de>)
Список pgsql-bugs
On Thu, 8 Jul 2004, Martin Pitt wrote:

> Hi PostgreSQL developers!
>
> Recently we got the bug report below. It seems that there is a special
> treatment of columns named "version". Normally fields of primary key
> indices are printed out unquoted, however, if the column is named
> "version", the name is printed out in quotes.
>
> This behaviour seems to confuse PostgreSQL autotoc.
>
> Does this behaviour serve any purpose or it is an error?

It doesn't appear to be necessary to quote the identifier, however version
and "version" refer to the same identifier in this case so I wouldn't call
it an error, either.  My guess as to the reason comes from this comment
fragment in quote_identifier:

* Check for keyword.  This test is overly strong, since many of
* the "keywords" known to the parser are usable as column names,
* but the parser doesn't provide any easy way to test for whether
* an identifier is safe or not... so be safe not sorry.

version is one of those keywords that are usable as column names I
believe.

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

Предыдущее
От: Martin Pitt
Дата:
Сообщение: Fwd: postgresql-autodoc - missinterprets "version"
Следующее
От: Martin Pitt
Дата:
Сообщение: Re: Fwd: postgresql-autodoc - missinterprets "version"