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 E63373A2B6C for ; Sat, 23 Oct 2004 22:54:49 +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 55255-03 for ; Sat, 23 Oct 2004 21:54:25 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id E0D653A2B5A for ; Sat, 23 Oct 2004 22:54:44 +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 i9NLsjrr027721; Sat, 23 Oct 2004 17:54:45 -0400 (EDT) To: Oliver Jowett Cc: Kris Jurka , Dave Smith , pgsql-jdbc@postgresql.org Subject: Re: Problem with fixed length fields. In-reply-to: <417ACB47.3090101@opencloud.com> References: <1098532450.2684.3.camel@davehome> <26657.1098556819@sss.pgh.pa.us> <417AC2C2.40605@opencloud.com> <27388.1098564647@sss.pgh.pa.us> <417ACB47.3090101@opencloud.com> Comments: In-reply-to Oliver Jowett message dated "Sun, 24 Oct 2004 10:21:11 +1300" Date: Sat, 23 Oct 2004 17:54:45 -0400 Message-ID: <27720.1098568485@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/248 X-Sequence-Number: 11353 Oliver Jowett writes: > Tom Lane wrote: >> 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. > Currently the driver issues Parse, Bind, Describe(portal), Execute, > Sync. If I understand correctly, you're suggesting we do Parse, > Describe(statement), Bind, Describe(portal), Execute, Sync. Oh, I was thinking in terms of setting up a prepared statement. You're right, it seems risky to forge ahead to the Execute with an unknown parameter type. An alternative that might be worth investigating is to specify the type as varchar instead of text. I am not sure of all the ramifications of this but in 7.4 and later it seems like it might do what you want. regards, tom lane