improved postgresql support

This commit is contained in:
wenshao
2015-06-02 04:45:21 +08:00
parent 58fe296645
commit af71ccc7cd
3 changed files with 10 additions and 0 deletions
@@ -40,6 +40,14 @@ public class PGExprParser extends SQLExprParser {
this.aggregateFunctions = AGGREGATE_FUNCTIONS;
this.dbType = JdbcConstants.POSTGRESQL;
}
@Override
public SQLDataType parseDataType() {
if (lexer.token() == Token.TYPE) {
lexer.nextToken();
}
return super.parseDataType();
}
@Override
public PGOrderBy parseOrderBy() {
@@ -63,6 +63,7 @@ public class PGLexer extends Lexer {
map.put("FALSE", Token.FALSE);
map.put("ARRAY", Token.ARRAY);
map.put("IF", Token.IF);
map.put("TYPE", Token.TYPE);
DEFAULT_PG_KEYWORDS = new Keywords(map);
}