From 3f5ec21ffcd4702fc54b4a769224760ffbc31de9 Mon Sep 17 00:00:00 2001 From: Andi Albrecht Date: Sun, 21 Dec 2014 17:12:37 +0100 Subject: Improve formatting of HAVING statements. --- sqlparse/engine/grouping.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sqlparse/engine') diff --git a/sqlparse/engine/grouping.py b/sqlparse/engine/grouping.py index ee534e3..a048128 100644 --- a/sqlparse/engine/grouping.py +++ b/sqlparse/engine/grouping.py @@ -301,7 +301,7 @@ def group_where(tlist): if not isinstance(sgroup, sql.Where)] idx = 0 token = tlist.token_next_match(idx, T.Keyword, 'WHERE') - stopwords = ('ORDER', 'GROUP', 'LIMIT', 'UNION', 'EXCEPT') + stopwords = ('ORDER', 'GROUP', 'LIMIT', 'UNION', 'EXCEPT', 'HAVING') while token: tidx = tlist.token_index(token) end = tlist.token_next_match(tidx + 1, T.Keyword, stopwords) -- cgit v1.2.1