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 E04153A54FA for ; Mon, 6 Dec 2004 13:23:31 +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 23203-07 for ; Mon, 6 Dec 2004 13:23:20 +0000 (GMT) Received: from mail63.csoft.net (leary3.csoft.net [63.111.22.74]) by svr1.postgresql.org (Postfix) with SMTP id 2DE2F3A5EF7 for ; Mon, 6 Dec 2004 13:23:19 +0000 (GMT) Received: (qmail 14001 invoked by uid 1112); 6 Dec 2004 13:24:40 -0000 Date: Mon, 6 Dec 2004 08:24:39 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Xavier Poinsard Cc: pgsql-jdbc@postgresql.org Subject: Re: Patch for jdbc escaped functions In-Reply-To: <1102068352.41b03a8098c80@imp6-q.free.fr> Message-ID: References: <1102068352.41b03a8098c80@imp6-q.free.fr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.04 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200412/48 X-Sequence-Number: 11714 On Fri, 3 Dec 2004, Xavier Poinsard wrote: > Here is the (final ?) patch adding escaped functions support. > - soundex and difference (based on phonetics and I saw nothing like that > in PostgreSql) contrib/fuzzystrmatch has something along these lines. We can't assume that's installed naturally and dynamically checking for it seems excessive, but perhaps we could put in the mapping if someone wants to use it, but just not report it in the DatabaseMetaData function? > - timestampadd and timestampdiff Yes, it is unclear what SQL_TSI_* really are. > Note that the implementations for some functions may cause problem if an > argument is a prepared statement argument since arguments may be > duplicated and the order changed, but I don't know if this should be > implemented for compliance. This is a serious problem. Duplicating the argument and erroring out is bad, and switching argument order and giving incorrect results is worse. How many functions does this affect. Remapping could be done, but it seems like a lot of work. Another issue is that this doesn't compile with a 1.2 or 1.3 JDK because of the code in AbstractJdbc2Statement.escapeFunction that calls Exception.getCause which is a 1.4 addition. One other minor thing I noticed is that 7.2 servers do not have the current_database function. This is a very minor thing, but I'm not sure what the best way to work around it is because right now the regression test suite does pass against a 7.2 server and I'd like to keep it that way. Kris Jurka