From c61e26ee3e447c0277c6c4e5a8a452dbefdc502d Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 8 Feb 2013 23:58:40 -0500 Subject: Add support for ALTER RULE ... RENAME TO. Ali Dar, reviewed by Dean Rasheed. --- doc/src/sgml/ref/allfiles.sgml | 1 + doc/src/sgml/ref/alter_rule.sgml | 105 ++++++++++++++++++++++++++++++++++++++ doc/src/sgml/ref/create_rule.sgml | 10 ++++ doc/src/sgml/ref/drop_rule.sgml | 5 +- doc/src/sgml/reference.sgml | 1 + 5 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 doc/src/sgml/ref/alter_rule.sgml (limited to 'doc/src') diff --git a/doc/src/sgml/ref/allfiles.sgml b/doc/src/sgml/ref/allfiles.sgml index b3fc57d942f..c61c62f2286 100644 --- a/doc/src/sgml/ref/allfiles.sgml +++ b/doc/src/sgml/ref/allfiles.sgml @@ -25,6 +25,7 @@ Complete list of usable sgml source files in this directory. + diff --git a/doc/src/sgml/ref/alter_rule.sgml b/doc/src/sgml/ref/alter_rule.sgml new file mode 100644 index 00000000000..0a186605a02 --- /dev/null +++ b/doc/src/sgml/ref/alter_rule.sgml @@ -0,0 +1,105 @@ + + + + + ALTER RULE + 7 + SQL - Language Statements + + + + ALTER RULE + change the definition of a rule + + + + ALTER RULE + + + + +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 + + + + + + + + diff --git a/doc/src/sgml/ref/create_rule.sgml b/doc/src/sgml/ref/create_rule.sgml index 381ea3ed6b4..ab2f1ba55c7 100644 --- a/doc/src/sgml/ref/create_rule.sgml +++ b/doc/src/sgml/ref/create_rule.sgml @@ -284,4 +284,14 @@ UPDATE mytable SET name = 'foo' WHERE id = 42; entire query rewrite system. + + + See Also + + + + + + + diff --git a/doc/src/sgml/ref/drop_rule.sgml b/doc/src/sgml/ref/drop_rule.sgml index ca52347209b..c845872566c 100644 --- a/doc/src/sgml/ref/drop_rule.sgml +++ b/doc/src/sgml/ref/drop_rule.sgml @@ -103,7 +103,9 @@ DROP RULE newrule ON mytable; Compatibility - There is no DROP RULE statement in the SQL standard. + DROP RULE is a + PostgreSQL language extension, as is the + entire query rewrite system. @@ -112,6 +114,7 @@ DROP RULE newrule ON mytable; + diff --git a/doc/src/sgml/reference.sgml b/doc/src/sgml/reference.sgml index fe90227b4f3..5b0c7745e39 100644 --- a/doc/src/sgml/reference.sgml +++ b/doc/src/sgml/reference.sgml @@ -53,6 +53,7 @@ &alterOperatorClass; &alterOperatorFamily; &alterRole; + &alterRule; &alterSchema; &alterSequence; &alterServer; -- cgit v1.2.3