[#7749] Support parsing CREATE INDEX .. ON .. USING btree (..)

This commit is contained in:
Lukas Eder 2018-08-10 16:27:13 +02:00
parent 7373ad1092
commit 7820534370
2 changed files with 2 additions and 1 deletions

View File

@ -122,7 +122,7 @@ break
;
createIndexStatement = 'CREATE' [ 'UNIQUE' ] 'INDEX' [ 'IF NOT EXISTS' ] [ indexName ] break
'ON' tableName '(' sortFields ')'
'ON' tableName [ 'USING' 'BTREE' ] '(' sortFields ')'
[ 'INCLUDE' '(' identifiers ')' ]
[ 'WHERE' condition ]
;

View File

@ -3269,6 +3269,7 @@ final class ParserImpl implements Parser {
Name indexName = parseIndexNameIf(ctx);
parseKeyword(ctx, "ON");
Table<?> tableName = parseTableName(ctx);
parseKeywordIf(ctx, "USING BTREE");
parse(ctx, '(');
SortField<?>[] fields = parseSortSpecification(ctx).toArray(EMPTY_SORTFIELD);
parse(ctx, ')');