From 17c03b30b0f191e62e992dc6af8c995fd2b007a2 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 7 Sep 2001 20:52:31 +0000 Subject: Revert treatment of NOTIFY in rules to its pre-7.1 behavior: notify will occur unconditionally, even if the rule should otherwise execute conditionally. This is more useful than giving an error, even though it's not truly the correct behavior. Per today's pghackers discussion. --- doc/src/sgml/ref/create_rule.sgml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'doc/src') diff --git a/doc/src/sgml/ref/create_rule.sgml b/doc/src/sgml/ref/create_rule.sgml index 4d682c8899a..47c029e653d 100644 --- a/doc/src/sgml/ref/create_rule.sgml +++ b/doc/src/sgml/ref/create_rule.sgml @@ -1,5 +1,5 @@ @@ -249,6 +249,20 @@ SELECT * FROM emp; + + + Presently, if a rule contains a NOTIFY query, the NOTIFY will be executed + unconditionally --- that is, the NOTIFY will be issued even if there are + not any rows that the rule should apply to. For example, in + +CREATE RULE notify_me AS ON UPDATE TO mytable DO NOTIFY mytable; + +UPDATE mytable SET name = 'foo' WHERE id = 42; + + one NOTIFY event will be sent during the UPDATE, whether or not there + are any rows with id = 42. This is an implementation restriction that + may be fixed in future releases. + -- cgit v1.2.3