Re: [gnome-db] reserved words



> i think that each provider must have a function to properly escape
> reserved words in sql statements
>
> for example
>
> "create table values (id integer)" crash in mysql and sqlite (not in
> postgres) because "values" is an sql reserved word; the problem is that
> mysql and sqlite escape reserved words in different ways (mysql with ``
> and sqlite with "")

Escaping is normally for special characters. Quoting should fix the use of
reserved words. For intance,
create table "values" (id integer)

The new libgda API should even remove the need to write a SQL command to
create a table - you can use libgda API for that, and then you shouldn't
have to worry about doing quoting or escaping yourself.

Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]