]> begriffs open source - ai-pg/blob - full-docs/txt/sql-droprule.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / sql-droprule.txt
1
2 DROP RULE
3
4    DROP RULE — remove a rewrite rule
5
6 Synopsis
7
8 DROP RULE [ IF EXISTS ] name ON table_name [ CASCADE | RESTRICT ]
9
10 Description
11
12    DROP RULE drops a rewrite rule.
13
14 Parameters
15
16    IF EXISTS
17           Do not throw an error if the rule does not exist. A notice is
18           issued in this case.
19
20    name
21           The name of the rule to drop.
22
23    table_name
24           The name (optionally schema-qualified) of the table or view that
25           the rule applies to.
26
27    CASCADE
28           Automatically drop objects that depend on the rule, and in turn
29           all objects that depend on those objects (see Section 5.15).
30
31    RESTRICT
32           Refuse to drop the rule if any objects depend on it. This is the
33           default.
34
35 Examples
36
37    To drop the rewrite rule newrule:
38 DROP RULE newrule ON mytable;
39
40 Compatibility
41
42    DROP RULE is a PostgreSQL language extension, as is the entire query
43    rewrite system.
44
45 See Also
46
47    CREATE RULE, ALTER RULE