On 1/4/08, CN <cnliou9@fastmail.fm> wrote:
> On Thu, 03 Jan 2008 14:20:41 -0500, "Chris Browne" <cbbrowne@acm.org>
> said:
> > > TODO already has:
> > >
> > > * Add optional textual message to NOTIFY
> > >
> > > This would allow an informational message to be added to the notify
> > > message, perhaps indicating the row modified or other custom
> > > information.
> >
> > I keep wondering if this isn't just going to grow into pgq...
> >
> > <http://docs.huihoo.com/api/skytools/pgq-module.html>
> >
> > In effect, once you start defining more semantics for this, I think it
> > rapidly transforms into a message queueing system, and you might as
> > well go straight to something full-fledged like pgq...
>
> While I believe pgq is feature rich, I prefer to see this TODO item be
> implemented. When it happens, all I need will be some more libpq C
> functions with which I will link my C client application as a single
> executable file. The benefits from the embedded feature will make the
> client lighter, easier to manage, and run faster.
I don't understand you. You basically need only 3 SQL functions
to read events from PgQ:
SELECT * from pgq.next_batch();
SELECT * from pgq.fetch_batch_events();
SELECT * from pgq.finish_batch();
To publish events to PgQ you need 1 SQL function:
SELECT * from pgq.insert_event();
How do those 4 queries make your client "fat" ?
--
marko