Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 4D8CC632CEF for ; Fri, 24 Apr 2009 05:45:28 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 80057-07 for ; Fri, 24 Apr 2009 05:45:12 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail2.fintrading.com (mail.fintrading.com [195.2.100.100]) by mail.postgresql.org (Postfix) with ESMTP id 5B11E63383B for ; Fri, 24 Apr 2009 05:45:17 -0300 (ADT) Received: from chipmunk (unknown [81.198.70.254]) by mail2.fintrading.com (Postfix) with ESMTPA id 1060C38113BE; Fri, 24 Apr 2009 11:44:31 +0300 (EEST) From: "Peter" To: "'Kris Jurka'" Cc: References: <00e701c9c3eb$625d43a0$2717cae0$@com> In-Reply-To: Subject: Re: JDBC problem with dates and ANYELEMENT type Date: Fri, 24 Apr 2009 11:44:30 +0300 Message-ID: <01e001c9c4b8$e28c93a0$a7a5bae0$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcnEhWywWeKyEJg1S7ywL+teHEua2gAMsUQA Content-Language: en-us X-MailScanner-ID: 1060C38113BE.99767 X-greatnowhere.com-MailScanner: Found to be clean X-greatnowhere.com-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-6.8, required 6, autolearn=not spam, ALL_TRUSTED -1.80, BAYES_00 -5.00) X-greatnowhere.com-MailScanner-From: peter@greatnowhere.com MailScanner-NULL-Check: 1241167473.50389@hwvaxRnSe32F78QapeYpfA X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=AWL=0.000 X-Spam-Level: X-Archive-Number: 200904/84 X-Sequence-Number: 19531 >> Any suggestions how to work around this so we can still use = ANYELEMENT=20 >> and pass in DATE? > You can put a cast into the query itself "SELECT ?::date". Nah... that's no good. The same query string is used for many different = types in my app - such approach would require me to parse the SQL string = and append cast to date when argument is java.sql.Date. I'll leave this = as last-ditch approach. What are the potential implications if I patch setDate() method in = AbstractJdbc2Statement to pass OID.Date instead of 'unspecified'? Would = that break anything else? We don=E2=80=99t use timestamps anywhere in = the app yet, so I'm not really worried about timezone being potentially = screwed up. Peter