DROP RULE
Synopsis
Use the DROP RULE
statement to remove a rule.
Syntax
drop_rule ::= DROP RULE [ IF EXISTS ] rule_name ON table_name
[ CASCADE | RESTRICT ]
drop_rule
Semantics
See the semantics of each option in the [PostgreSQL docs][postgresql-docs-drop-rule].
Examples
Basic example.
yugabyte=# CREATE TABLE t1(a int4, b int4);
yugabyte=# CREATE TABLE t2(a int4, b int4);
yugabyte=# CREATE RULE t1_to_t2 AS ON INSERT TO t1 DO INSTEAD
INSERT INTO t2 VALUES (new.a, new.b);
yugabyte=# DROP RULE t1_to_t2 ON t1;
See also
当前内容版权归 YugabyteDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 YugabyteDB .