just as a note.

"role" is a sql keyword in ansi-sql, it will be a reserved word in the
next version of Transact-SQL/Sql-server, the other databases should be
fine, and is used in auth.

"table_name" is a reserved keyword in postgresql -
http://www.postgresql.org/docs/8.3/static/sql-keywords-appendix.html
other databases seem to be fine.

Hrm... there are lots of "reserved keywords" in postgresql that I have
used for column names. Makes it annoying when something like "key" is
a perfect name for your column but its reserved. Why does it not fail
then?

-Thadeus





On Tue, Feb 2, 2010 at 11:31 AM, Thadeus Burgess <thade...@thadeusb.com> wrote:
> Actually, we can use the Adaptors to hold specific keywords. So in
> DAL.__init__ can have for fields if fieldname in
> self._adapter.KEYWORDS then raise SyntaxError
>
> -Thadeus
>
>
>
>
>
> On Tue, Feb 2, 2010 at 11:28 AM, Thadeus Burgess <thade...@thadeusb.com> 
> wrote:
>> Massimo, is there a better place (in dal.py) to place this check. The
>> most logical I see is the Field.__init__ constructor.
>>
>> -Thadeus
>>
>>
>>
>>
>>
>> On Tue, Feb 2, 2010 at 11:27 AM, Thadeus Burgess <thade...@thadeusb.com> 
>> wrote:
>>> I am working on this, I am integrating a list of reserved words into
>>> the Field() class.
>>>
>>> For now just the common SQL keywords, which I'm sure can be extended
>>> to include backend-specific keywords.
>>>
>>> -Thadeus
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Feb 2, 2010 at 11:08 AM, baloan <balo...@googlemail.com> wrote:
>>>> Thanks David for the reference.
>>>>
>>>> Btw, DATE is not marked as a reserved keyword on PostgreSQL and I can
>>>> create DATE columns using SQL or the admin tools (pgadmin).
>>>>
>>>> Consequently I was doubly confused as DATE appears as a web2py
>>>> reserved word to me.
>>>>
>>>> @Massimo: in your leisure time ;-) you may consider to change the
>>>> ProgrammingError exception to give a hint I used a "web2py/SQL
>>>> reserved word".
>>>>
>>>> Regards, Andreas
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google Groups 
>>>> "web2py-users" group.
>>>> To post to this group, send email to web...@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.
>>>>
>>>>
>>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@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.

Reply via email to