Re: libpq type system 0.9a

Поиск
Список
Период
Сортировка
От Andrew Chernow
Тема Re: libpq type system 0.9a
Дата
Msg-id 47F6E4C3.70607@esilo.com
обсуждение исходный текст
Ответ на Re: libpq type system 0.9a  (Joe Conway <mail@joeconway.com>)
Ответы Re: libpq type system 0.9a  (Andrew Chernow <ac@esilo.com>)
Список pgsql-patches
Joe Conway wrote:
> Alvaro Herrera 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.
>>
>
> +1
>
> Joe
>
>

What is gained by having a separate library?  Our changes don't bloat the
library size so I'm curious what the benefits are to not linking with it?  If
someone doesn't want to use, they don't have to.  Similar to the backend, there
is stuff in there I personally don't use (like geo types), but I'm not sure that
justifies a link option -lgeotypes.

The changes we made are closely tied to libpq's functionality.  Adding PQputf to
simplify the parameterized API, adding PQgetf to compliment PQgetvalue and added
the ability to register user-defined type handlers (used by putf and getf).
PQgetf makes extensive use of PGresult's internal API, especially for arrays and
composites.  Breaking this into a separate library would require an external
library to access the private internals of libpq.

Personally, I am not really in favor of this idea because it breaks apart code
that is very related.  Although, it is doable.

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

В списке pgsql-patches по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Minor changes to Recovery related code
Следующее
От: Andrew Chernow
Дата:
Сообщение: Re: libpq type system 0.9a