DROP RULE

Function

DROP RULE deletes a rewriting rule.

Syntax

DROP RULE [ IF EXISTS ] name ON table_name [ CASCADE | RESTRICT ]

Parameter Description

  • IF EXISTS

    If the rule does not exist, a NOTICE is thrown.

  • name

    Name of an existing rule to be deleted.

  • table_name

    Name of the table to which the rule applies.

  • CASCADE

    Automatically cascade deletes objects that depend on this rule.

  • RESTRICT

    By default, if any objects depend on the rule, the rule cannot be deleted.

Examples

-- Delete a rewriting rule.
newruleDROP RULE newrule ON mytable;
Feedback
编组 3备份
    openGauss 2024-12-26 01:05:31
    cancel