Re: NOTIFY in asynchronous mode - Mailing list psycopg

From Tobias Oberstein
Subject Re: NOTIFY in asynchronous mode
Date
Msg-id 634914A010D0B943A035D226786325D42D0C0CE424@EXVMBX020-12.exch020.serverdata.net
Whole thread Raw
In response to Re: NOTIFY in asynchronous mode  (Jan Urbański <wulczer@wulczer.org>)
List psycopg
-- Original message -----
> > What would be provided to the callback?
> >
> > Channel (from NOTIFIY), Payload (from NOTIFIY), Connection (txpostgres)
> ?
> 
> Probably simply the psycopg2 Notify object.

Ok, fine also.

And not the Connection object on which it was received? Ok, maybe it's
 not needed: When I want to do some db stuff within the callback, should
not make a difference on what connection I do that.

Few other design Qs:

Is it possible to UNLISTEN?

Or unregister a callback on a channel? Or set it to None?

Are callbacks for channels registered "globally" or per connection?

Can there be only one callback at most registered per channel?

psycopg by date:

Previous
From: Jan Urbański
Date:
Subject: Re: NOTIFY in asynchronous mode
Next
From: Daniele Varrazzo
Date:
Subject: Re: NOTIFY in asynchronous mode