From de0e6d9cc68048cd9bd42ff6b720dedadfaf1ef7 Mon Sep 17 00:00:00 2001 From: Andi Albrecht Date: Mon, 25 Jul 2011 16:41:10 +0200 Subject: Don't handle single chars as keywords. Most likely they are aliases. --- CHANGES | 1 + sqlparse/keywords.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 5a03251..8ede986 100644 --- a/CHANGES +++ b/CHANGES @@ -12,6 +12,7 @@ Bug Fixes by charles....@unige.ch). * Relax detection of keywords, esp. when used as function names (issue36, nyuhu...@gmail.com). + * Don't treat single characters as keywords (issue32). Release 0.1.2 (Nov 23, 2010) diff --git a/sqlparse/keywords.py b/sqlparse/keywords.py index f518974..9c59ee9 100644 --- a/sqlparse/keywords.py +++ b/sqlparse/keywords.py @@ -172,7 +172,7 @@ KEYWORDS = { 'FULL': tokens.Keyword, 'FUNCTION': tokens.Keyword, - 'G': tokens.Keyword, +# 'G': tokens.Keyword, 'GENERAL': tokens.Keyword, 'GENERATED': tokens.Keyword, 'GET': tokens.Keyword, @@ -219,7 +219,7 @@ KEYWORDS = { 'ISOLATION': tokens.Keyword, 'ITERATE': tokens.Keyword, - 'K': tokens.Keyword, +# 'K': tokens.Keyword, 'KEY': tokens.Keyword, 'KEY_MEMBER': tokens.Keyword, 'KEY_TYPE': tokens.Keyword, @@ -244,7 +244,7 @@ KEYWORDS = { 'LOCK': tokens.Keyword, 'LOWER': tokens.Keyword, - 'M': tokens.Keyword, +# 'M': tokens.Keyword, 'MAP': tokens.Keyword, 'MATCH': tokens.Keyword, 'MAXVALUE': tokens.Keyword, -- cgit v1.2.1