Hi Massimo, any progress on this? I need to migrato from MySql to
Postgres and this issue is stopping me (I'd like to avoid making
changes on the database right now).  If you think it might be good to
include this, I can start working on it and provide patches. I don't
like the idea of keeping my own modified version of web2py forever,
that is why I am asking if this might be included in a future version.

Just let me know.

Greets.

On 29 jul, 12:03, Massimo Di Pierro <[email protected]>
wrote:
> 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 andpostgres?
>
> > 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 toPostgres, 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.

Reply via email to