See my email to the dev list for full details. But the gist in regards to this...
First, we need to be able to recognize that an identifier is in fact a keyword. This piece is handled through org.hibernate.engine.jdbc.env.spi.JdbcEnvironment#isReservedWord, which is based on a Set of keywords computed from 2 distinct "keyword sources": 1) Dialect#getKeywords 2) DatabaseMetaData#getSQLKeywords
At the moment, I think this misses a third source... ANSI SQL 2003 standard keywords. DatabaseMetaData#getSQLKeywords specifically is supposed to return only keywords beyond the standard (2003) defined ones. There are really 2 options to address this: 1) add these standard keywords to Dialect 2) use a seperate (static) source for them.
Personally I prefer the second. Even if we added all the standard keywords to the base Dialect Set, it is just too easy for the Dialect subclass to override getKeywords(). Also, I like the idea of continuing the convention of these other 2 sources simply returning "extras".
|