Re: NOTIFY "string" from rule

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: NOTIFY "string" from rule
Дата
Msg-id
7296.993826013@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
NOTIFY "string" from rule "Jeff Boes" <jboes@nexcerpt.com>
Re: NOTIFY "string" from rule Tom Lane <tgl@sss.pgh.pa.us>
"Jeff Boes"  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 по дате отправления
От: Josh Berkus
Дата:
Сообщение: Evaluating Subselects
От: Jeff Eckermann
Дата:
Сообщение: RE: Evaluating Subselects
FAQ