pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Andrew Chernow <ac@esilo.com>
To: Merlin Moncure <mmoncure@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Patches (PostgreSQL) <pgsql-patches@postgresql.org>
Subject: Re: libpq object hooks
Date: Wed, 14 May 2008 12:34:08 -0400
Message-ID: <482B1480.1070705@esilo.com> (raw )
In-Reply-To: <b42b73150805140921v30d24b75m6c230932c61ffdd2@mail.gmail.com >
References: <b42b73150804301323i18b00019i62e765708abb65aa@mail.gmail.com >
<482A58D8.2030205@dunslane.net >
<20080514043313.GS6966@alvh.no-ip.org >
<482AD896.4000504@dunslane.net >
<19342.1210776271@sss.pgh.pa.us >
<b42b73150805140921v30d24b75m6c230932c61ffdd2@mail.gmail.com >
Merlin Moncure wrote:
> On Wed, May 14, 2008 at 10:44 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I'm wondering why the hooks need names at all. AFAICS all that
>> libpq needs to know about a hook is a callback function address
>> and a void * passthrough pointer.
>
> For reference...here is what libpqtypes has to do to bind via the
> hooking interface:
> http://libpqtypes.esilo.com/browse_source.html?file=hooks.c
>
> Are you proposing something substantially different (not my handle
> suggestion)? How would it work exactly?
>
> merlin
>
>
It is important to see how "NON-hook-callback" functions in libpqtypes
make use of the hook data.
PQparamCreate must get a pointer to the conn hook data
http://libpqtypes.esilo.com/browse_source.html?file=param.c#line24
PQgetf must get a pointer to the result hook data
http://libpqtypes.esilo.com/browse_source.html?file=exec.c#line65
These are NOT hook callbacks. The hook data is NOT isolated to callback
functions. It is memory that is publically accessible, outside hook
implementations.
--
Andrew Chernow
eSilo, LLC
every bit counts
http://www.esilo.com/
view thread (45+ messages) latest in thread
Message-ID: <482B1480.1070705@esilo.com>
Permalink: ../482B1480.1070705@esilo.com/
Also on: postgresql.org/message-id/482B1480.1070705@esilo.com
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: ac@esilo.com, mmoncure@gmail.com, tgl@sss.pgh.pa.us, andrew@dunslane.net, alvherre@commandprompt.com, pgsql-patches@postgresql.org
Subject: Re: libpq object hooks
In-Reply-To: <482B1480.1070705@esilo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox