File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -5959,3 +5959,30 @@ fn parse_varbit_datatype() {
59595959 _ => unreachable ! ( ) ,
59605960 }
59615961}
5962+
5963+ #[ test]
5964+ fn parse_alter_table_replica_identity ( ) {
5965+ match pg_and_generic ( ) . verified_stmt ( "ALTER TABLE foo REPLICA IDENTITY FULL" ) {
5966+ Statement :: AlterTable { operations, .. } => {
5967+ assert_eq ! (
5968+ operations,
5969+ vec![ AlterTableOperation :: ReplicaIdentity {
5970+ identity: ReplicaIdentity :: Full
5971+ } ]
5972+ ) ;
5973+ }
5974+ _ => unreachable ! ( ) ,
5975+ }
5976+
5977+ match pg_and_generic ( ) . verified_stmt ( "ALTER TABLE foo REPLICA IDENTITY USING INDEX foo_idx" ) {
5978+ Statement :: AlterTable { operations, .. } => {
5979+ assert_eq ! (
5980+ operations,
5981+ vec![ AlterTableOperation :: ReplicaIdentity {
5982+ identity: ReplicaIdentity :: Index ( "foo_idx" . into( ) )
5983+ } ]
5984+ ) ;
5985+ }
5986+ _ => unreachable ! ( ) ,
5987+ }
5988+ }
You can’t perform that action at this time.
0 commit comments