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

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

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Martin Pitt <martin(at)piware(dot)de>
Cc: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Fwd: postgresql-autodoc - missinterprets "version"
Date: 2004-07-08 14:10:22
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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

In response to


pgsql-bugs by date

Next:From: Martin PittDate: 2004-07-08 15:01:23
Subject: Re: Fwd: postgresql-autodoc - missinterprets "version"
Previous:From: Martin PittDate: 2004-07-08 13:42:34
Subject: Fwd: postgresql-autodoc - missinterprets "version"

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