Skip to content

Commit 693a432

Browse files
add test for VALIDATE CONSTRAINT
1 parent 40599f2 commit 693a432

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/sqlparser_postgres.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6260,3 +6260,16 @@ fn parse_alter_table_constraint_not_valid() {
62606260
_ => unreachable!(),
62616261
}
62626262
}
6263+
6264+
#[test]
6265+
fn parse_alter_table_validate_constraint() {
6266+
match pg().verified_stmt("ALTER TABLE foo VALIDATE CONSTRAINT bar") {
6267+
Statement::AlterTable { operations, .. } => {
6268+
assert_eq!(
6269+
operations,
6270+
vec![AlterTableOperation::ValidateConstraint { name: "bar".into() }]
6271+
);
6272+
}
6273+
_ => unreachable!(),
6274+
}
6275+
}

0 commit comments

Comments
 (0)