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>)
Список 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 по дате отправления:

Предыдущее
От: "Josh Berkus"
Дата:
Сообщение: Evaluating Subselects
Следующее
От: Jeff Eckermann
Дата:
Сообщение: RE: Evaluating Subselects