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 E86113A5DDC for ; Sun, 5 Dec 2004 23:30:17 +0000 (GMT) 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 02859-10 for ; Sun, 5 Dec 2004 23:30:06 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id C8E7B3A5DFA for ; Sun, 5 Dec 2004 23:30:05 +0000 (GMT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.20]) by yass.opencloud.co.nz with asmtp (Exim 3.35 #1 (Debian)) id 1Cb5pH-0002fQ-00; Mon, 06 Dec 2004 12:29:59 +1300 Message-ID: <41B39B6C.9020808@opencloud.com> Date: Mon, 06 Dec 2004 12:36:12 +1300 From: Oliver Jowett User-Agent: Mozilla Thunderbird 0.9 (X11/20041130) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Thomas Hallgren Cc: pgsql-jdbc@postgresql.org Subject: Re: prepared statement call fails References: <41B35CC6.2030800@mailblocks.com> <41B3663B.1010003@mailblocks.com> <41B37F31.1070205@opencloud.com> <41B39169.2060308@mailblocks.com> In-Reply-To: X-Enigmail-Version: 0.89.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200412/31 X-Sequence-Number: 11697 Thomas Hallgren wrote: [...] >> If the server makes changes that are not backwards-compatible, of >> course old drivers are going to break. But a) those sort of changes >> are rare and b) the same argument holds true for *everything* in the >> driver. > > In this case, the server will implement something that wasn't there > before so there will not be any compatibility breakage. But since the > JDBC driver use CallableStatement for something that it wasn't intended > for, the special mapping it performs will become a problem now that the > real thing exists. This is the whole point of using the standard escape syntax: when the server syntax changes, we can handle it without client applications needing to change. Witness support for setFetchSize() evolving through "do nothing" through "use DECLARE CURSOR and FETCH" through "use V3 portals". And probably into "(DECLARE CURSOR WITH HOLD and V3 portals) or V4 portals" eventually. At any rate, {?=call} support is existing functionality that people are using. Removing support for it because you fear that future code that hasn't been written yet will break it seems like a bad idea. As I understand it, the approach being taken for "real" SPs currently is to extend function behaviour to support the extra bits like OUT parameters and returned resultsets, probably via extra SQL commands. So mapping a subset of {call} to what existing functions *do* support seems fine; we just tweak that mapping to reflect any new features on the server side. There doesn't seem to be a big model change in the works, which is all I'd be concerned about. Am I wrong here? If you have some particular concerns about how the proposed SP syntax, whatever it is, is going to break the JDBC driver, by all means raise them.. but this seems like vague handwaving at the moment. -O