summaryrefslogtreecommitdiff
path: root/sqlparse/sql.py
diff options
context:
space:
mode:
Diffstat (limited to 'sqlparse/sql.py')
-rw-r--r--sqlparse/sql.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sqlparse/sql.py b/sqlparse/sql.py
index d1ee143..52d9b4a 100644
--- a/sqlparse/sql.py
+++ b/sqlparse/sql.py
@@ -386,7 +386,8 @@ class IdentifierList(TokenList):
Whitespaces and punctuations are not included in this list.
"""
- return [x for x in self.tokens if isinstance(x, Identifier)]
+ return [x for x in self.tokens
+ if not x.is_whitespace() and not x.match(T.Punctuation, ',')]
class Parenthesis(TokenList):