libpq and multiple selects in a single query

Поиск
Список
Период
Сортировка
От Tim Hart
Тема libpq and multiple selects in a single query
Дата
Msg-id E4A80FA6-1A38-11D7-96DD-000393460410@mac.com
обсуждение исходный текст
Ответы Re: libpq and multiple selects in a single query
Re: libpq and multiple selects in a single query
Список pgsql-interfaces
I was musing a bit today, so don't take this to seriously...

Would it be worth the effort to add to and/or modify the libpq API so 
that multiple selects could be sent to the server in a single request 
and response? Obviously, this is trivial from the command line...

select * from foo; select * from bar;

But - at least as far as I understand the libpq API - only one select 
can be issued using PQexec.

In many of the apps I develop, I find that the majority of the time I 
have to go to the database for a select, I have to select from several 
tables. I haven't done any benchmarking, but given the rule-of-thumb 
that inter-process communication incurs high overhead, I decided that 
being able to issue several statements in one call might be worth 
investigating. Given the holiday season though, I haven't actually done 
much work to see if PQexec actually does support this. I'd be surprised 
if a client-server or n-tier app wouldn't benefit from this 
functionality.



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: still memory leaks with libpgtcl
Следующее
От: "."@babolo.ru
Дата:
Сообщение: Re: libpq and multiple selects in a single query