Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ Alphabetical list of contributors:
* Victor Hahn <info@victor-hahn.de>
* Victor Uriarte <vmuriart@gmail.com>
* Ville Skyttä <ville.skytta@iki.fi>
* Vincent Gao <gaobing1230@gmail.com>
* vthriller <farreva232@yandex.ru>
* wayne.wuw <wayne.wuw@alibaba-inc.com>
* Will Jones <willjones127@gmail.com>
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ Bug Fixes

* Fix statement splitting (issue845).
* Fix a late-binding closure bug in `TokenList.token_not_matching`.
* Recognize ``MATERIALIZED`` as a keyword so it is parsed and formatted
consistently in ``CREATE MATERIALIZED VIEW`` statements (issue752).


Release 0.5.5 (Dec 19, 2025)
Expand Down
1 change: 1 addition & 0 deletions sqlparse/keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@
# 'M': tokens.Keyword,
'MAP': tokens.Keyword,
'MATCH': tokens.Keyword,
'MATERIALIZED': tokens.Keyword,
'MAXEXTENTS': tokens.Keyword,
'MAXVALUE': tokens.Keyword,
'MESSAGE_LENGTH': tokens.Keyword,
Expand Down
8 changes: 8 additions & 0 deletions tests/test_regressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,14 @@ def test_primary_key_issue740():
assert p.tokens[0].ttype == T.Keyword


def test_materialized_view_issue752():
p = sqlparse.parse('CREATE MATERIALIZED VIEW v AS SELECT 1')[0]
assert p.tokens[2].ttype == T.Keyword
Comment on lines +457 to +459
formatted = sqlparse.format('create materialized view v as select 1',
keyword_case='upper')
assert formatted == 'CREATE MATERIALIZED VIEW v AS SELECT 1'


@pytest.fixture
def limit_recursion():
curr_limit = sys.getrecursionlimit()
Expand Down