X-Original-To: pgsql-jdbc-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 09FB09FB1B7 for ; Fri, 23 Jun 2006 13:19:10 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 34217-09 for ; Fri, 23 Jun 2006 13:19:04 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 54AA29FB0D1 for ; Fri, 23 Jun 2006 13:19:03 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k5NGIvWl016341; Fri, 23 Jun 2006 12:18:57 -0400 (EDT) To: Dave Cramer cc: Michael Guyver , List Subject: Re: Binary tx format for an array? 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> <30b57570606230547x6a35451ag7d4a9c697533d0c9@mail.gmail.com> <847D8099-EA4C-4692-A01C-7A18B3280D68@fastcrypt.com> Comments: In-reply-to Dave Cramer message dated "Fri, 23 Jun 2006 09:17:03 -0400" Date: Fri, 23 Jun 2006 12:18:57 -0400 Message-ID: <16340.1151079537@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/105 X-Sequence-Number: 15385 Dave Cramer 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