On Tue, Feb 22, 2011 at 1:03 AM, ivan_14_32 wrote:
> Hi!
> I trying to create rule for update notifing:
>
> CREATE OR REPLACE RULE "ttt_NotifyU" AS
> ON UPDATE TO "ttt" DO
> NOTIFY "ttt", '88';
> this work.
>
> But this
> CREATE OR REPLACE RULE "ttt_NotifyU" AS
> ON UPDATE TO "ttt" DO
>
On Tue, Feb 22, 2011 at 1:03 AM, ivan_14_32 wrote:
> Hi!
> I trying to create rule for update notifing:
>
> CREATE OR REPLACE RULE "ttt_NotifyU" AS
> ON UPDATE TO "ttt" DO
> NOTIFY "ttt", '88';
> this work.
>
> But this
> CREATE OR REPLACE RULE "ttt_NotifyU" AS
> ON UPDATE TO "ttt" DO
>
ivan_14_32 writes:
> Q: How can I send tuple id (integer primary key) via notify using Rule?
You can't --- NOTIFY doesn't take variables in its parameters.
(That's a general property of utility commands, not just NOTIFY.)
Use the pg_notify() function, instead.
regards, t