From: Michael Paesold <mpaesold@gmx.at>
To: Kris Jurka <books@ejurka.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Problem with 8.1 driver
Date: Fri, 09 Dec 2005 10:41:41 +0100
Message-ID: <43995155.5000301@gmx.at> (raw)
In-Reply-To: <Pine.BSO.4.61.0512061035180.5324@leary.csoft.net>
References: <024401c5f9da$537c29c0$0f01a8c0@zaphod>
<Pine.BSO.4.61.0512051715450.781@leary.csoft.net>
<00b001c5fa45$123f1a60$0f01a8c0@zaphod>
<Pine.BSO.4.61.0512061035180.5324@leary.csoft.net>
Kris Jurka wrote:
> On Tue, 6 Dec 2005, Michael Paesold wrote:
>
>> Another question that occurred to me is, how should I tell the driver
>> to specify a type as "undefined" or "unknown" to the server?
>>
>> Some random tries that did not work:
>> stmt.setObject(2, "1 month", java.sql.Types.OTHER);
>> --> Cannot cast an instance of String to type Types.OTHER
>
> You can use
>
> stmt.setObject(2, new org.postgresql.util.PGInterval("1 month"));
Thanks, that works. Altough I would prefer a way to do this in a
standard way (without org.postgresql classes). The real problem here is
probably that there is no Types.INTERVAL. What a shame.
Do you think it would be reasonable for the driver to implementing
> stmt.setObject(2, "1 month", java.sql.Types.OTHER);
as sending the parameter as "unknown"?
I.e. would a patch implementing this be accepted? Or is Types.OTHER
reserved for a different meaning?
Best Regards,
Michael Paesold
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: mpaesold@gmx.at, books@ejurka.com
Subject: Re: Problem with 8.1 driver
In-Reply-To: <43995155.5000301@gmx.at>
References: <024401c5f9da$537c29c0$0f01a8c0@zaphod> <Pine.BSO.4.61.0512051715450.781@leary.csoft.net> <00b001c5fa45$123f1a60$0f01a8c0@zaphod> <Pine.BSO.4.61.0512061035180.5324@leary.csoft.net> <43995155.5000301@gmx.at>
* 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