Re: pg_notify but no pg_listen?

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: "A(dot)M(dot)" <agentm(at)themactionfaction(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_notify but no pg_listen?
Date: 2010-08-24 03:46:04
Message-ID: 4C73407C.9020906@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 24/08/2010 11:06 AM, A.M. wrote:
>
> On Aug 23, 2010, at 10:18 PM, Craig Ringer wrote:
>
>> On 08/24/2010 06:43 AM, Bruce Momjian wrote:
>>> A.M. wrote:
>>>> There is a new pg_notify function in pgsql 9.0 but no pg_listen
>>>> equivalent? Why? It sure would be handy to pass quoted strings...
>>>
>>> Notify sends the notify; there is no place to send a 'listen' payload.
>>
>> I assume what they want is the ability to filter notifications, so they only get notifications with a certain payload.
>>
>> Seems to me that in that case you should just be using different notify values (possibly using the two-argument form of pg_notify) so you can listen on different things depending on what you are interested in.
>
> Actually, my use case was for parameterized queries and pl functions where it's much easier to use quoted strings for the notification name as well as the payload- it would just be a convenience, really.

So what you really want is the ability to pg_listen and pg_notify on a
*name* instead of a numeric key?

--
Craig Ringer

Tech-related writing at http://soapyfrogs.blogspot.com/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2010-08-24 05:47:35 Re: select from pipe-delimited field
Previous Message A.M. 2010-08-24 03:06:44 Re: pg_notify but no pg_listen?