There are two possibilities. First, use names that contain an underscore. AFAIK, there aren't any reserved words that have them. Second, SQL has some special quoting rules; character constants are supposed to be enclosed in single quotes, names may be enclosed in double quotes. In the latter case, the names may contain reserved words, embedded spaces, even non-alphanumeric characters. I've seen code generators that enclose all names in double quotes, whether needed or not. I'm sure that web2py could be patched to do this as well.
On Jun 18, 8:03 pm, Richard <richar...@gmail.com> wrote: > hi, > > I like to develop my web2py apps with sqlite and then migrate to mysql > or postgres later. I often then find that some of the table or field > names are reserved in the new database, which requires lots of > renames. > > Does anyone have a strategy for dealing with this? > Does there perhaps exist a list of words that are reserved in at least > one database? If so, perhaps this could be somehow incorporated into > web2py to make switching between databases more seamless. > > Richard --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---