Skip to content

Commit bbe3430

Browse files
authored
fix: handle WITH in ALTER statement splitting (#728)
- Add `WITH_KW` to ALTER DDL splitter fallback handling - Fix splitting for `ALTER TEXT SEARCH CONFIGURATION ... ALTER MAPPING ... WITH ...` - Add a regression SQL test covering text search configuration ALTER syntax fixes #724
1 parent 2df5b3c commit bbe3430

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

crates/pgls_statement_splitter/src/splitter/ddl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ pub(crate) fn create(p: &mut Splitter) -> SplitterResult {
1313
pub(crate) fn alter(p: &mut Splitter) -> SplitterResult {
1414
p.expect(SyntaxKind::ALTER_KW)?;
1515

16-
unknown(p, &[SyntaxKind::ALTER_KW])
16+
unknown(p, &[SyntaxKind::ALTER_KW, SyntaxKind::WITH_KW])
1717
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ALTER TEXT SEARCH CONFIGURATION schema.config_name
2+
ALTER MAPPING FOR asciiword, asciihword, hword_asciipart, word, hword, hword_part
3+
WITH unaccent, schema.dictionary_name;

0 commit comments

Comments
 (0)