add test for VALIDATE CONSTRAINT

This commit is contained in:
achristmascarl 2025-06-25 14:58:52 -04:00
parent 7947c6a72e
commit 6b1bc3716a

View file

@ -6259,3 +6259,16 @@ fn parse_alter_table_constraint_not_valid() {
_ => unreachable!(),
}
}
#[test]
fn parse_alter_table_validate_constraint() {
match pg().verified_stmt("ALTER TABLE foo VALIDATE CONSTRAINT bar") {
Statement::AlterTable { operations, .. } => {
assert_eq!(
operations,
vec![AlterTableOperation::ValidateConstraint { name: "bar".into() }]
);
}
_ => unreachable!(),
}
}