Hi,

migrating my application to Postgres, I've been hit by the "user"
reserved keyword problem previously commented on
http://groups.google.com/group/web2py/browse_thread/thread/f23c03ff8143b55/15602d3158ae5e6c.

According to PostgreSQL documentation,
http://www.postgresql.org/docs/8.2/static/sql-syntax-lexical.html,
section 4.1.1:

-----

There is a second kind of identifier: the delimited identifier or
quoted identifier. It is formed by enclosing an arbitrary sequence of
characters in double-quotes ("). A delimited identifier is always an
identifier, never a key word. So "select" could be used to refer to a
column or table named "select", whereas an unquoted select would be
taken as a key word and would therefore provoke a parse error when
used where a table or column name is expected. The example can be
written with quoted identifiers like this:

UPDATE "my_table" SET "a" = 5;

-----

Shouldn't web2py use this syntax by default in order to avoid keyword
collisions? Probably there is a similar syntax for other DB engines as
well (for example, quote using [name] in SQL Server, etc.). Is there
something against this?

Thanks.

Reply via email to