Re: libpq type system 0.9a

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>
Cc: "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: libpq type system 0.9a
Date: 2008-04-05 14:15:32
Message-ID: b42b73150804050715k64cc797n7e7ac4bf3237b293@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Fri, Apr 4, 2008 at 6:56 PM, Alvaro Herrera
<alvherre(at)commandprompt(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc G. Fournier 2008-04-05 14:45:21 Re: [HACKERS] Patch queue -> wiki
Previous Message Andrew Dunstan 2008-04-05 13:32:16 Re: column level privileges

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2008-04-05 14:31:59 Re: Headers dependencies cleanup
Previous Message Pavel Stehule 2008-04-05 12:03:23 plpgsql RETURN QUERY EXECUTE