summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES2
-rw-r--r--sqlparse/engine/grouping.py1
2 files changed, 3 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 471615c..ff2753b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,8 @@ Bug Fixes
Malyshev).
* Fix a bug where keywords were identified as aliased identifiers in
invalid SQL statements.
+ * Fix parsing of identifier lists where identifiers are keywords too
+ (issue10).
Enhancements
* Top-level API functions now accept encoding keyword to parse
diff --git a/sqlparse/engine/grouping.py b/sqlparse/engine/grouping.py
index d03e483..d60ee5a 100644
--- a/sqlparse/engine/grouping.py
+++ b/sqlparse/engine/grouping.py
@@ -213,6 +213,7 @@ def group_identifier_list(tlist):
lambda t: t.ttype == T.Number.Integer,
lambda t: t.ttype == T.String.Single,
lambda t: t.ttype == T.Name.Placeholder,
+ lambda t: t.ttype == T.Keyword,
lambda t: isinstance(t, sql.Comparison),
lambda t: isinstance(t, sql.Comment),
]