1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

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.
This commit is contained in:
Tom Lane
2001-09-07 20:52:31 +00:00
parent 8c55728295
commit 17c03b30b0
2 changed files with 30 additions and 12 deletions

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_rule.sgml,v 1.25 2001/09/03 12:57:49 petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_rule.sgml,v 1.26 2001/09/07 20:52:30 tgl Exp $
Postgres documentation
-->
@ -249,6 +249,20 @@ SELECT * FROM emp;
</programlisting></para>
</example>
</para>
<para>
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
<programlisting>
CREATE RULE notify_me AS ON UPDATE TO mytable DO NOTIFY mytable;
UPDATE mytable SET name = 'foo' WHERE id = 42;
</programlisting>
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.
</para>
</refsect2>
</refsect1>