diff options
author | Andi Albrecht <albrecht.andi@gmail.com> | 2014-12-01 09:36:52 +0100 |
---|---|---|
committer | Andi Albrecht <albrecht.andi@gmail.com> | 2014-12-01 09:36:52 +0100 |
commit | 1e8a1b7cdb2d07eedfc525290dbfd3ac8e2882b6 (patch) | |
tree | 6d43ee4e05a4b065c347d0bc0e27b5355fcf48a1 /sqlparse/lexer.py | |
parent | a525a29c754522d6fa1b904792f7a8991142c4c5 (diff) | |
download | sqlparse-1e8a1b7cdb2d07eedfc525290dbfd3ac8e2882b6.tar.gz |
Fix a regression for identifiers with square bracktes notation (fixes #153).
Diffstat (limited to 'sqlparse/lexer.py')
-rw-r--r-- | sqlparse/lexer.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sqlparse/lexer.py b/sqlparse/lexer.py index 6bd414f..631c267 100644 --- a/sqlparse/lexer.py +++ b/sqlparse/lexer.py @@ -195,7 +195,7 @@ class Lexer(object): (r"'(''|\\'|[^'])*'", tokens.String.Single), # not a real string literal in ANSI SQL: (r'(""|".*?[^\\]")', tokens.String.Symbol), - (r'(\[.*[^\]]\])', tokens.Name), + (r'(\[[^\]]+\])', tokens.Name), (r'((LEFT\s+|RIGHT\s+|FULL\s+)?(INNER\s+|OUTER\s+|STRAIGHT\s+)?|(CROSS\s+|NATURAL\s+)?)?JOIN\b', tokens.Keyword), (r'END(\s+IF|\s+LOOP)?\b', tokens.Keyword), (r'NOT NULL\b', tokens.Keyword), |