Re: Notiffy problem

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Notiffy problem
Дата
Msg-id 4FED676A.8020307@archonet.com
обсуждение исходный текст
Ответ на Notiffy problem  (adasko98 <adasko.86@gmail.com>)
Ответы Re: Notiffy problem  (adasko98 <adasko.86@gmail.com>)
Re: Notiffy problem  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-general
On 29/06/12 09:01, adasko98 wrote:
> Hi
> In first sorry for my english :) I have got a problem with notify/listener.
> I do a function which returns a trigger. Everything is ok but when i want
> send in a second parameter a variable NOTIFY say: "syntax error"

>      Notify demoApp, 'some text';

>     n_user :='sda';
>      Notify demoApp, n_user ;<----here is a problem

Looks like a limitation of the plpgsql parser, perhaps even counts as a
bug. You can work around it with EXECUTE though, something like:
   cmd := 'NOTIFY demoApp, ' || quote_literal(n_user);
   EXECUTE cmd;
or just
   EXECUTE 'NOTIFY demoApp, ' || quote_literal(n_user);

--
   Richard Huxton
   Archonet Ltd

В списке pgsql-general по дате отправления:

Предыдущее
От: Atri Sharma
Дата:
Сообщение: Regarding parallel running of 9.1 and 9.2beta2
Следующее
От: raghu ram
Дата:
Сообщение: Re: Regarding parallel running of 9.1 and 9.2beta2