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

Re: libpq object hooks

From: Andrew Chernow <ac(at)esilo(dot)com>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: libpq object hooks
Date: 2008-05-14 16:34:08
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-patches
Merlin Moncure wrote:
> On Wed, May 14, 2008 at 10:44 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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 is what libpqtypes has to do to bind via the
> hooking interface:
> 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

PQgetf must get a pointer to the result hook data

These are NOT hook callbacks.  The hook data is NOT isolated to callback 
functions.  It is memory that is publically accessible, outside hook 

Andrew Chernow
eSilo, LLC
every bit counts

In response to


pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2008-05-14 16:44:11
Subject: Re: Re: [COMMITTERS] pgsql: Improve logic for findingobject files on OBJS lines in contrib
Previous:From: Peter EisentrautDate: 2008-05-14 16:31:03
Subject: Re: how to perform silent installation on linux and solaris

pgsql-patches by date

Next:From: Andrew ChernowDate: 2008-05-14 18:09:09
Subject: Re: libpq object hooks
Previous:From: Merlin MoncureDate: 2008-05-14 16:21:56
Subject: Re: libpq object hooks

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