Re: NOTIFY "string" from rule - Mailing list pgsql-sql

From Tom Lane
Subject Re: NOTIFY "string" from rule
Date
Msg-id 7296.993826013@sss.pgh.pa.us
Whole thread Raw
In response to NOTIFY "string" from rule  ("Jeff Boes" <jboes@nexcerpt.com>)
List pgsql-sql
"Jeff Boes" <jboes@nexcerpt.com> writes:
> CREATE FUNCTION bar(foo) RETURNS TEXT AS
> 'SELECT $1.status || ''_'' || $1.name;'
> LANGUAGE 'sql';
> and then change the last line of the rule to
> NOTIFY bar(new);
> but no luck.

AFAIK the only way to do NOTIFY with a computed name is to write a
function in plpgsql or pltcl that computes a string 'NOTIFY whatever'
and then EXECUTEs that string.  There's no equivalent functionality
in SQL-language functions.
        regards, tom lane


pgsql-sql by date:

Previous
From: "Josh Berkus"
Date:
Subject: Evaluating Subselects
Next
From: Jeff Eckermann
Date:
Subject: RE: Evaluating Subselects