Re: Notiffy problem

From: adasko98 <adasko(dot)86(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Notiffy problem
Date: 2012-06-29 13:58:00
Message-ID: 1340978280061-5714782.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Fri, Jun 29, 2012 at 3:29 AM, Richard Huxton <dev(at)archonet(dot)com> wrote:
> 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);

also see pg_notify() function.

Yes i'm looking for that. But i connect c# application with postgres and
pg_notify() don't work with my notify event. Anyway thanks for help

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Notiffy-problem-tp5714744p5714782.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Atri Sharma 2012-06-29 14:04:18 Re: Regarding parallel running of 9.1 and 9.2beta2
Previous Message Merlin Moncure 2012-06-29 13:50:31 Re: Notiffy problem