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.