Skip to content

In CREATE MATERIALIZED VIEW statements MATERIALIZED is not recognized as a keyword #752

Description

@sean-rose

Describe the bug
In CREATE MATERIALIZED VIEW statements MATERIALIZED is not recognized as a keyword.

To Reproduce

import sqlparse
parsed = sqlparse.parse('create materialized view x.y.z as select 1 as id')[0]
print(parsed.tokens[2].is_keyword)  # This should be True
print(parsed.tokens[2].normalized)  # This should be "MATERIALIZED" (uppercased)

Expected behavior
In CREATE MATERIALIZED VIEW statements MATERIALIZED should be recognized as a keyword, and thus should also be automatically uppercased in the normalized property.

Versions (please complete the following information):

  • Python: 3.10.7
  • sqlparse: 0.4.4

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions