Re: [PATCHES] libpq type system 0.9a

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Chernow <ac(at)esilo(dot)com>
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 20:25:29
Message-ID: 26941.1207772729@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Andrew Chernow <ac(at)esilo(dot)com> writes:
> Tom Lane wrote:
>> Hmm. I guess it wouldn't be completely out of the question to expose
>> the contents of PGresult as part of libpq's API.

> How about a proxy header (if such an animal exists).

A separate header might be a good idea to discourage unnecessary
reliance on the struct, but it doesn't change the basic fact that
we'd be adding the struct to our ABI and couldn't change it without
a major library version number bump.

Perhaps we could do a partial exposure, where the exported struct
declaration contains "public" fields and there are some "private" ones
after that. This would still work for external creation of PGresults,
so long as all PGresults are initially manufactured by
PQmakeEmptyPGresult. That would give us a little bit of wiggle room
... in particular I'd be very tempted not to expose the fields
associated with space allocation (we could export pqResultAlloc
instead), nor anything not foreseeably needed by libpgtypes.

> Maybe it is
> possible to take pg_result, and all structs it references, and put it in
> result-int.h.

I'd think something like libpq-result.h would be a better choice of
name. The other seems likely to collide with who-knows-what from
other packages,

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-04-09 20:31:25 Re: Commit fest queue
Previous Message Tom Lane 2008-04-09 19:57:06 Re: [PATCHES] libpq type system 0.9a

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2008-04-09 20:26:31 Re: Fix for win32 stat() problems
Previous Message Tom Lane 2008-04-09 19:57:06 Re: [PATCHES] libpq type system 0.9a