Mattias Kregert <matti@algonet.se> writes:
> Async communication between backend and frontend would be really nice.
> I use Tcl a lot and I really miss this. It would be wonderful to have
> libpgtcl do callbacks, so that info on-screen could be automagically
> updated whenever something changes.
Yes, if anything were to be done along this line it'd also make sense
to revise libpgtcl. I think it ought to work more like this:
(a) the idle loop is invoked while waiting for a query response
(so that a pg_exec statement behaves sort of like "tkwait");
(b) a "listen" command is sent via a new pg_listen statement that
specifies a callback command string. Subsequent notify responses
can occur whenever a callback is possible.
I suppose (a) had better be an option to pg_exec statements so that
we don't break existing Tcl code...
regards, tom lane