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 088E25294C for ; Tue, 7 Jun 2005 23:59:34 -0300 (ADT) 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 46903-02 for ; Wed, 8 Jun 2005 02:59:28 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 09D1152942 for ; Tue, 7 Jun 2005 23:59:27 -0300 (ADT) 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 j582xLFq026297; Tue, 7 Jun 2005 22:59:21 -0400 (EDT) To: Oliver Jowett Cc: Carl Olivier , pgsql-jdbc@postgresql.org Subject: Re: DatabaseMetaData and Transactions In-reply-to: <42A613DA.7090300@opencloud.com> References: <473185057AB4D7118B6C00508B624DDA1C96BB@ALPHENPDC> <42A613DA.7090300@opencloud.com> Comments: In-reply-to Oliver Jowett message dated "Wed, 08 Jun 2005 09:38:34 +1200" Date: Tue, 07 Jun 2005 22:59:21 -0400 Message-ID: <26296.1118199561@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/34 X-Sequence-Number: 12996 Oliver Jowett writes: > You're going to have to pass metadata down, or change your queries to > explicitly cast the parameters in the SQL itself. The driver has exactly > the same problem as your code does -- with the v3 protocol it needs to > provide a type for the parameter, but if it's just provided as a string > the only type it can assume is text.. Is there any chance of a win in passing the type across to the backend as "unknown", and seeing if the backend can infer something reasonable? For example given WHERE int4col = ? it'd be reasonable to infer the type of the ? symbol as int4, and that logic has been built into the backend since forever. regards, tom lane