Re: Binary tx format for an array?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dave Cramer <pg(at)fastcrypt(dot)com>
Cc: Michael Guyver <kenevel(at)googlemail(dot)com>, List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Binary tx format for an array?
Date: 2006-06-23 16:18:57
Message-ID: 16340.1151079537@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Dave Cramer <pg(at)fastcrypt(dot)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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Mark Lewis 2006-06-23 20:32:03 Re: Binary tx format for an array?
Previous Message Dave Cramer 2006-06-23 13:17:03 Re: Binary tx format for an array?