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
In response to
pgsql-bugs by date
|Next:||From: Martin Pitt||Date: 2004-07-08 15:01:23|
|Subject: Re: Fwd: postgresql-autodoc - missinterprets "version"|
|Previous:||From: Martin Pitt||Date: 2004-07-08 13:42:34|
|Subject: Fwd: postgresql-autodoc - missinterprets "version"|