Re: libpq type system 0.9a - Mailing list pgsql-patches

From Merlin Moncure
Subject Re: libpq type system 0.9a
Date
Msg-id b42b73150804050715k64cc797n7e7ac4bf3237b293@mail.gmail.com
Whole thread Raw
In response to Re: libpq type system 0.9a  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-patches
On Fri, Apr 4, 2008 at 6:56 PM, Alvaro Herrera
<alvherre@commandprompt.com> wrote:
> Merlin Moncure escribió:
>
> > Yesterday, we notified -hackers of the latest version of the libpq
>  > type system.  Just to be sure the right people are getting notified,
>  > we are posting the latest patch here as well.  Would love to get some
>  > feedback on this.
>
>  I had a look at this patch some days ago, and the first question in my
>  mind was: why is it explicitely on libpq?  Why not have it as a separate
>  library (say libpqtypes)?  That way, applications not using it would not
>  need to link to it.  Applications interested in using it would just need
>  to add another -l switch to their link line.

I think that is oversimplifying things a little bit.  As Andrew stated
there are some aspects of the type system that would not so easily
abstracted out into a separate library.  The type handlers them selves
could be moved out...but since they are basically hardcoded in the
server (for the built in types), why not do it in the client as well?
The libpq type system was deliberately designed so that user types
could be 'plugged in' .

I think a reasonable objective would be to organize the types a little
bit better in both the client and the server so there would be more
code reuse.  We would support this change, but it would require some
changes to the server as well.

OTOH, we are proposing to extend the libpq interface.  IMO, breaking
the libpq interface to separate libraries would only cause confusion.

merlin

pgsql-patches by date:

Previous
From: "Pavel Stehule"
Date:
Subject: plpgsql RETURN QUERY EXECUTE
Next
From: Bruce Momjian
Date:
Subject: Re: Headers dependencies cleanup