Skip site navigation (1) Skip section navigation (2)

Re: libpq object hooks

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Andrew Dunstan" <andrew(at)dunslane(dot)net>, "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>, "Andrew Chernow" <ac(at)esilo(dot)com>
Subject: Re: libpq object hooks
Date: 2008-05-16 20:17:30
Message-ID: b42b73150805161317v3e9803b8t368eb0bc5c4b51b1@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
On Fri, May 16, 2008 at 3:49 PM, Merlin Moncure <mmoncure(at)gmail(dot)com> wrote:
> On Fri, May 16, 2008 at 2:34 PM, Andrew Chernow <ac(at)esilo(dot)com> wrote:
>> Tom Lane wrote:
>>>
>>> typedef void (*PGeventProc) (PGeventId eventId, const void *eventInfo,
>>>                             void *passthrough);
>>>
>>> int PQregisterEventProc(PGconn *conn, PGeventProc proc, void
>>> *passthrough);
>
>> The above prototypes will work and we will add our 'event instance pointer'
>> to the event info structures.  Should have a patch shortly.
>
>
> Right.  I actually overlooked the 'passthrough' in
> PQregisterEventProc.  It turns out that we are still not quite on the
> same page and this needs to be clarified before we move on.  The
> passthrough cannot exist...the correct prototypes (reasoning will
> follow) are:
>
> typedef void (*PGeventProc) (PGeventId eventId, const void *eventInfo);

small typo: eventInfo obviously can't be const

> int PQregisterEventProc(PGconn *conn, PGeventProc proc);
> PQhookData(const PGconn* conn, PGeventProc proc);

PQhookData is the old name...we are going with 'events' now....the
proper names will come with the patch.

merlin

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2008-05-16 20:23:16
Subject: Re: libpq object hooks
Previous:From: Merlin MoncureDate: 2008-05-16 19:49:36
Subject: Re: libpq object hooks

pgsql-patches by date

Next:From: Tom LaneDate: 2008-05-16 20:23:16
Subject: Re: libpq object hooks
Previous:From: Merlin MoncureDate: 2008-05-16 19:49:36
Subject: Re: libpq object hooks

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group