X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1483EEAE55E for ; Sat, 23 Oct 2004 21:50:20 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 41839-01 for ; Sat, 23 Oct 2004 20:50:29 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 172FEEAE554 for ; Sat, 23 Oct 2004 21:50:14 +0100 (BST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id i9NKomsY027389; Sat, 23 Oct 2004 16:50:48 -0400 (EDT) To: Oliver Jowett Cc: Kris Jurka , Dave Smith , pgsql-jdbc@postgresql.org Subject: Re: Problem with fixed length fields. In-reply-to: <417AC2C2.40605@opencloud.com> References: <1098532450.2684.3.camel@davehome> <26657.1098556819@sss.pgh.pa.us> <417AC2C2.40605@opencloud.com> Comments: In-reply-to Oliver Jowett message dated "Sun, 24 Oct 2004 09:44:50 +1300" Date: Sat, 23 Oct 2004 16:50:47 -0400 Message-ID: <27388.1098564647@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/246 X-Sequence-Number: 11351 Oliver Jowett writes: > Tom Lane wrote: >> Can you refrain from assigning a type at all? > Pushing on blindly with a Bind without knowing the actual type of the > parameters you're sending seems possible but dangerous. It'd preclude > using binary-format parameters for unknown types, at a minimum. I had in mind doing this *only* for setString; you would essentially be assuming that the resolved type was text, varchar, or char, which have interchangeable binary formats. It would probably be a good idea to do a Describe Statement to verify that the parameter got resolved as one of those, but this need not add a round-trip, since you could issue it with the Parse message. regards, tom lane