This is a good idea. Let me give this some thought.
On Jul 28, 10:35 am, Álvaro J. Iradier <[email protected]> wrote: > Couldn't it be implemented by calling a engine-dependent method like > sql_quote(name), which in other engines would by default return the > unquoted string, but return the quoted name in mysql and postgres? > > Greets. > > On 27 jul, 22:16, Massimo Di Pierro <[email protected]> > wrote: > > > > > > > > > Yes. The dal was rewritten to allow this. The reason it was never > > implemented fully is that I cannot find documentation about this for > > all supported db engines. Implementing this only for mysql and pgsql > > is a pain. > > > On Jul 27, 2:34 pm, Álvaro J. Iradier <[email protected]> wrote: > > > > Hi, > > > > migrating my application to Postgres, I've been hit by the "user" > > > reserved keyword problem previously commented > > > onhttp://groups.google.com/group/web2py/browse_thread/thread/f23c03ff81.... > > > > 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.

