diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2012-04-19 22:16:09 +0200 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2012-04-19 22:16:09 +0200 |
| commit | fb9ba15d47f6041a1ebebc738ec2707da0de49f1 (patch) | |
| tree | 85999f392b564a22ff9ce879181e2ed04c222ddd | |
| parent | e4bccf45a6e82d4738aab1b5eded3fa208a76875 (diff) | |
| download | sqlparse-fb9ba15d47f6041a1ebebc738ec2707da0de49f1.tar.gz | |
Pretty formatting of role keyword in identifier list (fixes #49).
| -rw-r--r-- | CHANGES | 6 | ||||
| -rw-r--r-- | sqlparse/engine/grouping.py | 1 |
2 files changed, 4 insertions, 3 deletions
@@ -2,9 +2,9 @@ Development ----------- Bug Fixes - * Avoid "stair case" effects when identifiers and functions are mixed - in identifier lists (issue45) and when asterisks are used as - operators (issue58). + * Avoid "stair case" effects when identifiers, functions or keywords + are mixed in identifier lists (issue45, issue49) and when asterisks + are used as operators (issue58). * Make keyword detection more restrict (issue47). * Improve handling of CASE statements (issue46). * Fix statement splitting when parsing recursive statements (issue57, diff --git a/sqlparse/engine/grouping.py b/sqlparse/engine/grouping.py index 499ba8c..923ea63 100644 --- a/sqlparse/engine/grouping.py +++ b/sqlparse/engine/grouping.py @@ -194,6 +194,7 @@ def group_identifier_list(tlist): lambda t: t.ttype == T.Name, lambda t: t.ttype == T.Wildcard, lambda t: t.match(T.Keyword, 'null'), + lambda t: t.match(T.Keyword, 'role'), lambda t: t.ttype == T.Number.Integer, lambda t: t.ttype == T.String.Single, lambda t: isinstance(t, sql.Comparison), |
