Re: NOTIFY "string" from rule

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jeff Boes" <jboes(at)nexcerpt(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: NOTIFY "string" from rule
Date: 2001-06-29 14:46:53
Message-ID: 7296.993826013@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Jeff Boes" <jboes(at)nexcerpt(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2001-06-29 15:02:50 Evaluating Subselects
Previous Message Josh Berkus 2001-06-29 14:43:00 Re: day difference