Re: libpq events update

Lists: pgsql-hackers
From: Andrew Chernow <ac(at)esilo(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: libpq events update
Date: 2008-09-05 13:49:21
Message-ID: 48C138E1.4010003@esilo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

I would like to remove the PQpassThroughData and PQresultPassThroughData
functions. The passThrough pointer should be added as a 3rd argument
to the PGEventProc:

typedef int (*PGEventProc)(PGEventId evtId, void *evtInfo,
void *passThrough);

Having a public accessor function for the passThrough. doesn't seem
helpful. Its purpose is to be available to the eventproc, which doesn't
require a public function.

I think it got confused with the instanceData feature, which has nothing
to do with the event system and requires public functions. libpqtypes
happens to use the instanceData functions within its eventproc, but this
is not a requirement.

All those who oppose any of the above, speak now or forever hold your
peace. An updated patch with full sgml documentation is coming.

--
Andrew Chernow
eSilo, LLC
every bit counts
http://www.esilo.com/


From: Andrew Chernow <ac(at)esilo(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: libpq events update
Date: 2008-09-05 13:54:41
Message-ID: 48C13A21.4020904@esilo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Andrew Chernow wrote:
>
> I think it got confused with the instanceData feature, which has nothing
> to do with the event system and requires public functions. libpqtypes
> happens to use the instanceData functions within its eventproc, but this
> is not a requirement.
>

I forgot to mention that the instanceData functions should be moved from
libpq-events.h to libpq-fe.h because they are not part of the event
system. I plan on making this change as well, so let me know if you
hate it.

--
Andrew Chernow
eSilo, LLC
every bit counts
http://www.esilo.com/


From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: "Andrew Chernow" <ac(at)esilo(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: libpq events update
Date: 2008-09-05 19:22:16
Message-ID: b42b73150809051222n4c21d517x52fdc2ca4465b1f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Sep 5, 2008 at 9:54 AM, Andrew Chernow <ac(at)esilo(dot)com> wrote:
> Andrew Chernow wrote:
>>
>> I think it got confused with the instanceData feature, which has nothing
>> to do with the event system and requires public functions. libpqtypes
>> happens to use the instanceData functions within its eventproc, but this is
>> not a requirement.
>>
>
> I forgot to mention that the instanceData functions should be moved from
> libpq-events.h to libpq-fe.h because they are not part of the event system.
> I plan on making this change as well, so let me know if you hate it.

An updated patch with docs and the above change is on -patches.
Should we have sent that here?

merlin