manpagez: man pages & more
man ALTER_RULE(7)
Home | html | info | man
ALTER RULE(7)           PostgreSQL 9.4.15 Documentation          ALTER RULE(7)




NAME

       ALTER_RULE - change the definition of a rule


SYNOPSIS

       ALTER RULE name ON table_name RENAME TO new_name


DESCRIPTION

       ALTER RULE changes properties of an existing rule. Currently, the only
       available action is to change the rule's name.

       To use ALTER RULE, you must own the table or view that the rule applies
       to.


PARAMETERS

       name
           The name of an existing rule to alter.

       table_name
           The name (optionally schema-qualified) of the table or view that
           the rule applies to.

       new_name
           The new name for the rule.


EXAMPLES

       To rename an existing rule:

           ALTER RULE notify_all ON emp RENAME TO notify_me;


COMPATIBILITY

       ALTER RULE is a PostgreSQL language extension, as is the entire query
       rewrite system.


SEE ALSO

       CREATE RULE (CREATE_RULE(7)), DROP RULE (DROP_RULE(7))



PostgreSQL 9.4.15                    2017                        ALTER RULE(7)

PostgreSQL 9.4.15 - Generated Sun Nov 26 19:25:26 CST 2017
© manpagez.com 2000-2025
Individual documents may contain additional copyright information.