Re: Binary tx format for an array?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Binary tx format for an array?
Дата
Msg-id 16340.1151079537@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Binary tx format for an array?  (Dave Cramer <pg@fastcrypt.com>)
Список pgsql-jdbc
Dave Cramer <pg@fastcrypt.com> writes:
> Hmmm maybe I should read before sending. It appears that both input,
> and output can be text. The only catch with output is that you have
> to do a describe first to get the types. This may negate any gains on
> small result sets, but certainly for large ones it would help.

Right, both parameters and results can be mixed, but to ask for
mixed-format result columns you have to know how many there are
... and in reality you probably want to know what the column
types are before you make your decisions, anyway.  So unless the
driver has a-priori knowledge of the result column set, which I
gather it doesn't, there'd need to be an additional round trip
to fetch and inspect the query's result column set before issuing BIND.

I think that in practice most clients would do "all text all the time"
or "all binary all the time", which is why the protocol allows compact
selection of those two cases.

            regards, tom lane

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

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: Binary tx format for an array?
Следующее
От: Mark Lewis
Дата:
Сообщение: Re: Binary tx format for an array?