]> begriffs open source - ai-pg/blob - full-docs/txt/sql-alterrule.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / sql-alterrule.txt
1
2 ALTER RULE
3
4    ALTER RULE — change the definition of a rule
5
6 Synopsis
7
8 ALTER RULE name ON table_name RENAME TO new_name
9
10 Description
11
12    ALTER RULE changes properties of an existing rule. Currently, the only
13    available action is to change the rule's name.
14
15    To use ALTER RULE, you must own the table or view that the rule applies
16    to.
17
18 Parameters
19
20    name
21           The name of an existing rule to alter.
22
23    table_name
24           The name (optionally schema-qualified) of the table or view that
25           the rule applies to.
26
27    new_name
28           The new name for the rule.
29
30 Examples
31
32    To rename an existing rule:
33 ALTER RULE notify_all ON emp RENAME TO notify_me;
34
35 Compatibility
36
37    ALTER RULE is a PostgreSQL language extension, as is the entire query
38    rewrite system.
39
40 See Also
41
42    CREATE RULE, DROP RULE