warn and escape SQL reserved keywords
warn and escape SQL reserved keywords

Ignore-this: aa193c2204461de5dd64d4f30bcae16

Macaque did not check that identifiers chosen by the user were valid
SQL identifiers. Using a SQL reserved keyword resulted in a syntax
error at runtime, when sending the SQL request to the
database. Macaque now detects reserved keywords, warn the user, and
escape such reserved words to avoid runtime failure.

This issue was reported by Vincent Balat.

It may be necessary in the future to be able to selectively disable
escaping; if an user has an already-existing table that is marked as
a reserved SQL keyword but for some reason accept by his/her SQL
server, Macaque would currently still escape the table name, making
the user unable to refer to it.

darcs-hash:20120414111813-47e18-8a5a3be9e495818a8fe7cb9dc45ec87b2ae05d58

Chris00/macaque