Re: Proper query implementation for Postgresql driver

Поиск
Список
Период
Сортировка
От Marko Tiikkaja
Тема Re: Proper query implementation for Postgresql driver
Дата
Msg-id 5427E5A9.5060109@joh.to
обсуждение исходный текст
Ответ на Proper query implementation for Postgresql driver  (Shay Rojansky <roji@roji.org>)
Ответы Re: Proper query implementation for Postgresql driver  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 9/28/14, 11:53 AM, Shay Rojansky wrote:
> I would, in theory, love to switch the entire thing to binary and thereby
> avoid all textual parsing once and for all. If I understand correctly, this
> means all queries must be implemented as extended queries, with numerous
> extra client-server roundtrips - which are a bit hard to stomach. Section
> 49.1.2 of the manual also states that the unnamed prepared statement and
> portal are optimized for the case of executing a query only once, hinting
> that this is the proper way to do things - but this optimization still
> cannot not eliminate the extra roundtrips mentioned above (PREPARE, BIND,
> EXECUTE).

You don't have to do multiple round-trips for that; you can just send 
all the messages in one go.  See how e.g. libpq does it in PQexecParams().


.marko



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

Предыдущее
От: Shay Rojansky
Дата:
Сообщение: Proper query implementation for Postgresql driver
Следующее
От: Andreas Karlsson
Дата:
Сообщение: Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}