Skip to content

Commit 4ea43ec

Browse files
committed
fix: timestamp with time zone split
1 parent dfd40e7 commit 4ea43ec

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

crates/pgt_statement_splitter/src/lib.rs

+7
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,13 @@ mod tests {
8585
}
8686
}
8787

88+
#[test]
89+
fn ts_with_timezone() {
90+
Tester::from("alter table foo add column bar timestamp with time zone;").expect_statements(
91+
vec!["alter table foo add column bar timestamp with time zone;"],
92+
);
93+
}
94+
8895
#[test]
8996
fn failing_lexer() {
9097
let input = "select 1443ddwwd33djwdkjw13331333333333";

crates/pgt_statement_splitter/src/parser/common.rs

+2
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,8 @@ pub(crate) fn unknown(p: &mut Parser, exclude: &[SyntaxKind]) {
249249
SyntaxKind::Ordinality,
250250
// WITH CHECK should not start a new statement
251251
SyntaxKind::Check,
252+
// TIMESTAMP WITH TIME ZONE should not start a new statement
253+
SyntaxKind::Time,
252254
]
253255
.iter()
254256
.all(|x| Some(x) != next.as_ref())

0 commit comments

Comments
 (0)