Re: Libpq question

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Libpq question
Дата
Msg-id 14935.1337609391@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Libpq question  (Jasen Betts <jasen@xnet.co.nz>)
Список pgsql-general
Jasen Betts <jasen@xnet.co.nz> writes:
> On 2012-05-16, John Townsend <jtownsend@advancedformulas.com> wrote:
>> *** So...the question: Is there a good reason why you might want to NOT
>> use libpq.dll, and just directly access the server through direct
>> function calls? ***

> libpq binds you to using NUL terminated C strings, and, no doubt, other C
> idioms.

Note that bypassing libpq will not get you around that one, because the
server (and indeed the wire protocol) also use nul-terminated strings.

Generally the places where people have chosen to reimplement the
protocol from scratch are where they *couldn't* use libpq for some
reason or other; for instance the JDBC driver doesn't use libpq because
non-Java code is painful to deal with in a Java environment.  I'm pretty
doubtful that it's worth anybody's trouble to reimplement just to save a
layer of function calls.

            regards, tom lane

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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: Global Named Prepared Statements
Следующее
От: Luca Ferrari
Дата:
Сообщение: help understanding the bitmap heap scan costs