Re: [PATCHES] libpq type system 0.9a

From: Andrew Chernow <ac(at)esilo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, Greg Sabino Mullane <greg(at)turnstep(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCHES] libpq type system 0.9a
Date: 2008-04-09 14:54:15
Message-ID: 47FCD897.8050404@esilo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Andrew Chernow <ac(at)esilo(dot)com> writes:
>> There is no need to pass hookData to the hook function. libpqtypes already
>> accesses PGconn and PGresult directly so it can just access the hookData member.
>
> That's a habit you'd really be best advised to stop, if you're going to
> be a separate library. Otherwise, any time we make an internal change
> in the PGconn struct, it'll break your library --- and we have and will
> feel free to do that without an external soname change.
>
> What parts of PGconn/PGresult do you need to touch that aren't exposed
> already?
>
> regards, tom lane
>

Well, we manually create a result for arrays and composites. We also
use pqResultAlloc in several places. I will have to look at the code
again but I'm not sure we can be completely abstracted from the result
struct.

If you are suggesting that libpqtypes should not access internal libpq,
than this idea won't work. We can pull all the code out and hook in, as
you suggested, but we had no plans of abstracting from internal libpq.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Aidan Van Dyk 2008-04-09 14:55:59 Re: Commit fest queue
Previous Message Andrew Chernow 2008-04-09 14:50:44 Re: [PATCHES] libpq type system 0.9a

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2008-04-09 14:56:20 Re: EXPLAIN progress info
Previous Message Andrew Chernow 2008-04-09 14:50:44 Re: [PATCHES] libpq type system 0.9a