@@ -45,6 +45,18 @@ pub enum AlterTableOperation {
45
45
/// <column_def>.
46
46
column_def : ColumnDef ,
47
47
} ,
48
+ /// `DISABLE ROW LEVEL SECURITY`
49
+ ///
50
+ /// Note: this is a PostgreSQL-specific operation.
51
+ DisableRowLevelSecurity ,
52
+ /// `DISABLE RULE rewrite_rule_name`
53
+ ///
54
+ /// Note: this is a PostgreSQL-specific operation.
55
+ DisableRule { name : Ident } ,
56
+ /// `DISABLE TRIGGER [ trigger_name | ALL | USER ]`
57
+ ///
58
+ /// Note: this is a PostgreSQL-specific operation.
59
+ DisableTrigger { name : Ident } ,
48
60
/// `DROP CONSTRAINT [ IF EXISTS ] <name>`
49
61
DropConstraint {
50
62
if_exists : bool ,
@@ -61,6 +73,34 @@ pub enum AlterTableOperation {
61
73
///
62
74
/// Note: this is a MySQL-specific operation.
63
75
DropPrimaryKey ,
76
+ /// `ENABLE ALWAYS RULE rewrite_rule_name`
77
+ ///
78
+ /// Note: this is a PostgreSQL-specific operation.
79
+ EnableAlwaysRule { name : Ident } ,
80
+ /// `ENABLE ALWAYS TRIGGER trigger_name`
81
+ ///
82
+ /// Note: this is a PostgreSQL-specific operation.
83
+ EnableAlwaysTrigger { name : Ident } ,
84
+ /// `ENABLE REPLICA RULE rewrite_rule_name`
85
+ ///
86
+ /// Note: this is a PostgreSQL-specific operation.
87
+ EnableReplicaRule { name : Ident } ,
88
+ /// `ENABLE REPLICA TRIGGER trigger_name`
89
+ ///
90
+ /// Note: this is a PostgreSQL-specific operation.
91
+ EnableReplicaTrigger { name : Ident } ,
92
+ /// `ENABLE ROW LEVEL SECURITY`
93
+ ///
94
+ /// Note: this is a PostgreSQL-specific operation.
95
+ EnableRowLevelSecurity ,
96
+ /// `ENABLE RULE rewrite_rule_name`
97
+ ///
98
+ /// Note: this is a PostgreSQL-specific operation.
99
+ EnableRule { name : Ident } ,
100
+ /// `ENABLE TRIGGER [ trigger_name | ALL | USER ]`
101
+ ///
102
+ /// Note: this is a PostgreSQL-specific operation.
103
+ EnableTrigger { name : Ident } ,
64
104
/// `RENAME TO PARTITION (partition=val)`
65
105
RenamePartitions {
66
106
old_partitions : Vec < Expr > ,
@@ -143,6 +183,15 @@ impl fmt::Display for AlterTableOperation {
143
183
AlterTableOperation :: AlterColumn { column_name, op } => {
144
184
write ! ( f, "ALTER COLUMN {column_name} {op}" )
145
185
}
186
+ AlterTableOperation :: DisableRowLevelSecurity => {
187
+ write ! ( f, "DISABLE ROW LEVEL SECURITY" )
188
+ }
189
+ AlterTableOperation :: DisableRule { name } => {
190
+ write ! ( f, "DISABLE RULE {name}" )
191
+ }
192
+ AlterTableOperation :: DisableTrigger { name } => {
193
+ write ! ( f, "DISABLE TRIGGER {name}" )
194
+ }
146
195
AlterTableOperation :: DropPartitions {
147
196
partitions,
148
197
if_exists,
@@ -177,6 +226,27 @@ impl fmt::Display for AlterTableOperation {
177
226
column_name,
178
227
if * cascade { " CASCADE" } else { "" }
179
228
) ,
229
+ AlterTableOperation :: EnableAlwaysRule { name } => {
230
+ write ! ( f, "ENABLE ALWAYS RULE {name}" )
231
+ }
232
+ AlterTableOperation :: EnableAlwaysTrigger { name } => {
233
+ write ! ( f, "ENABLE ALWAYS TRIGGER {name}" )
234
+ }
235
+ AlterTableOperation :: EnableReplicaRule { name } => {
236
+ write ! ( f, "ENABLE REPLICA RULE {name}" )
237
+ }
238
+ AlterTableOperation :: EnableReplicaTrigger { name } => {
239
+ write ! ( f, "ENABLE REPLICA TRIGGER {name}" )
240
+ }
241
+ AlterTableOperation :: EnableRowLevelSecurity => {
242
+ write ! ( f, "ENABLE ROW LEVEL SECURITY" )
243
+ }
244
+ AlterTableOperation :: EnableRule { name } => {
245
+ write ! ( f, "ENABLE RULE {name}" )
246
+ }
247
+ AlterTableOperation :: EnableTrigger { name } => {
248
+ write ! ( f, "ENABLE TRIGGER {name}" )
249
+ }
180
250
AlterTableOperation :: RenamePartitions {
181
251
old_partitions,
182
252
new_partitions,
0 commit comments