summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2012-04-19 22:16:09 +0200
committerAndi Albrecht <albrecht.andi@gmail.com>2012-04-19 22:16:09 +0200
commitfb9ba15d47f6041a1ebebc738ec2707da0de49f1 (patch)
tree85999f392b564a22ff9ce879181e2ed04c222ddd
parente4bccf45a6e82d4738aab1b5eded3fa208a76875 (diff)
downloadsqlparse-fb9ba15d47f6041a1ebebc738ec2707da0de49f1.tar.gz
Pretty formatting of role keyword in identifier list (fixes #49).
-rw-r--r--CHANGES6
-rw-r--r--sqlparse/engine/grouping.py1
2 files changed, 4 insertions, 3 deletions
diff --git a/CHANGES b/CHANGES
index 5ee5652..7e1941e 100644
--- a/CHANGES
+++ b/CHANGES
@@ -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),