pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dave Cramer <pg@fastcrypt.com>
Cc: Michael Guyver <kenevel@googlemail.com>
Cc: List <pgsql-jdbc@postgresql.org>
Subject: Re: Binary tx format for an array?
Date: Fri, 23 Jun 2006 12:18:57 -0400
Message-ID: <16340.1151079537@sss.pgh.pa.us> (raw)
In-Reply-To: <847D8099-EA4C-4692-A01C-7A18B3280D68@fastcrypt.com>
References: <30b57570606211026o66e337c9s658387db0b32aeed@mail.gmail.com>
	<17160.1150929667@sss.pgh.pa.us>
	<30b57570606220116h2f216c1eue74e5cfbb41bd5bc@mail.gmail.com>
	<1048.1150995309@sss.pgh.pa.us>
	<1151003773.21238.13.camel@archimedes>
	<30b57570606230122s4827d2ectd470e3c4ff6ad228@mail.gmail.com>
	<5D40D46E-2EFE-4EC1-98B2-642C7C5E3229@fastcrypt.com>
	<30b57570606230523n402acc77uae9184301f44e19e@mail.gmail.com>
	<E3A47647-4BAC-4628-9326-DF2F8B9DDA88@fastcrypt.com>
	<30b57570606230547x6a35451ag7d4a9c697533d0c9@mail.gmail.com>
	<C56E6A5C-357F-4E96-8272-D05AAA69950E@fastcrypt.com>
	<847D8099-EA4C-4692-A01C-7A18B3280D68@fastcrypt.com>

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



view thread (18+ messages)  latest in thread

Message-ID: <16340.1151079537@sss.pgh.pa.us>
Permalink:  ../16340.1151079537@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/16340.1151079537@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pg@fastcrypt.com, kenevel@googlemail.com
  Subject: Re: Binary tx format for an array?
  In-Reply-To: <16340.1151079537@sss.pgh.pa.us>
  References: <30b57570606211026o66e337c9s658387db0b32aeed@mail.gmail.com> <17160.1150929667@sss.pgh.pa.us> <30b57570606220116h2f216c1eue74e5cfbb41bd5bc@mail.gmail.com> <1048.1150995309@sss.pgh.pa.us> <1151003773.21238.13.camel@archimedes> <30b57570606230122s4827d2ectd470e3c4ff6ad228@mail.gmail.com> <5D40D46E-2EFE-4EC1-98B2-642C7C5E3229@fastcrypt.com> <30b57570606230523n402acc77uae9184301f44e19e@mail.gmail.com> <E3A47647-4BAC-4628-9326-DF2F8B9DDA88@fastcrypt.com> <30b57570606230547x6a35451ag7d4a9c697533d0c9@mail.gmail.com> <C56E6A5C-357F-4E96-8272-D05AAA69950E@fastcrypt.com> <847D8099-EA4C-4692-A01C-7A18B3280D68@fastcrypt.com> <16340.1151079537@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox