From 3942d09bd0be0a7b207864ebd0a5ce2ea0f9e28e Mon Sep 17 00:00:00 2001 From: Andi Albrecht Date: Thu, 19 Apr 2012 22:21:00 +0200 Subject: Properly group placeholders in identifier lists (fixes #52). --- CHANGES | 7 ++++--- sqlparse/engine/grouping.py | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 7e1941e..098e846 100644 --- a/CHANGES +++ b/CHANGES @@ -2,9 +2,10 @@ Development ----------- Bug Fixes - * Avoid "stair case" effects when identifiers, functions or keywords - are mixed in identifier lists (issue45, issue49) and when asterisks - are used as operators (issue58). + * Avoid "stair case" effects when identifiers, functions, + placeholders or keywords are mixed in identifier lists (issue45, + issue49, issue52) 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 923ea63..55ec7e2 100644 --- a/sqlparse/engine/grouping.py +++ b/sqlparse/engine/grouping.py @@ -197,6 +197,7 @@ def group_identifier_list(tlist): lambda t: t.match(T.Keyword, 'role'), lambda t: t.ttype == T.Number.Integer, lambda t: t.ttype == T.String.Single, + lambda t: t.ttype == T.Name.Placeholder, lambda t: isinstance(t, sql.Comparison), lambda t: isinstance(t, sql.Comment), ] -- cgit v1.2.1