From fb9ba15d47f6041a1ebebc738ec2707da0de49f1 Mon Sep 17 00:00:00 2001 From: Andi Albrecht Date: Thu, 19 Apr 2012 22:16:09 +0200 Subject: Pretty formatting of role keyword in identifier list (fixes #49). --- CHANGES | 6 +++--- sqlparse/engine/grouping.py | 1 + 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), -- cgit v1.2.1