Well, this is interesting. With the proper quoting of the SQL command you can create a table named "user" with no problems on postgresql:
if2k9=# create table user ( did integer, name varchar(40) ); ERROR: syntax error at or near "user" LINE 1: create table user ( did integer, name varchar(40) ); mydb=# create table "user" ( did integer, name varchar(40) ); CREATE TABLE mydb=# insert into "user" VALUES (1,'Jeff Koftinoff'); INSERT 0 1 mydb=# select * from "user"; did | name -----+---------------- 1 | Jeff Koftinoff (1 row) So the appropriate fix is to fix the way web2py quotes the sql queries. Regards, Jeff Koftinoff www.jdkoftinoff.com On Dec 29 2008, 1:37 pm, "Yarko Tymciurak" <yark...@gmail.com> wrote: > A couple of things: > > "name" is not a "reserved keyword" (see URL Fran referenced) - which means > "name" is OK as a table or column name. And since "name" doesn't appear > reserved in any of the SQL standards listed, I think this should be ok in > other backends also... > > 'user' however _IS_ a reserved keyword in all the SQL standards listed in > that link. You can modify it to be > 'user_' which will always be safe, or some other thing - 'my_user', etc. > > As Fran pointed out, anything in that list which is reserved in any version > of SQL is just not a fair table or column name for any database (not just > Postgres) > > Regards, > Yarko > > On Mon, Dec 29, 2008 at 3:10 PM, Fran <francisb...@googlemail.com> wrote: > > > On Dec 29, 9:03 pm, Alex <shes...@gmail.com> wrote: > > > So only solution to rename tables and fields everywhere ? > > > AFAIK, yes...sorry... > > > F --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---