From: Peter <peter@greatnowhere.com>
To: 'Kris Jurka' <books@ejurka.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: JDBC problem with dates and ANYELEMENT type
Date: Fri, 24 Apr 2009 11:44:30 +0300
Message-ID: <01e001c9c4b8$e28c93a0$a7a5bae0$@com> (raw)
In-Reply-To: <Pine.BSO.4.64.0904232234430.16180@leary.csoft.net>
References: <00e701c9c3eb$625d43a0$2717cae0$@com>
<Pine.BSO.4.64.0904232234430.16180@leary.csoft.net>
>> Any suggestions how to work around this so we can still use ANYELEMENT
>> 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’t use timestamps anywhere in the app yet, so I'm not really worried about timezone being potentially screwed up.
Peter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: peter@greatnowhere.com, books@ejurka.com
Subject: Re: JDBC problem with dates and ANYELEMENT type
In-Reply-To: <01e001c9c4b8$e28c93a0$a7a5bae0$@com>
References: <00e701c9c3eb$625d43a0$2717cae0$@com> <Pine.BSO.4.64.0904232234430.16180@leary.csoft.net> <01e001c9c4b8$e28c93a0$a7a5bae0$@com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox