Skip to content

Commit 694747f

Browse files
filiprem-clickupandialbrecht
authored andcommitted
fix: Add ATTACH, DETACH to PostgreSQL keywords.
Examples of valid, not so rare statements in postgres dialect. ``` ALTER TABLE atable DETACH PARTITION atable_p00; ALTER INDEX atable_acolumn_idx ATTACH PARTITION atable_p01_acolumn_idx; ``` They fall into same class as `EXTENSION` added in below PR, so let's add them as well. In the same rationale as #785
1 parent 2743109 commit 694747f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sqlparse/keywords.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,8 @@
839839
'CONFLICT': tokens.Keyword,
840840
'WINDOW': tokens.Keyword,
841841
'PARTITION': tokens.Keyword,
842+
'ATTACH': tokens.Keyword,
843+
'DETACH': tokens.Keyword,
842844
'OVER': tokens.Keyword,
843845
'PERFORM': tokens.Keyword,
844846
'NOTICE': tokens.Keyword,

0 commit comments

Comments
 (0)