Re: Problem with 8.1 driver

Поиск
Список
Период
Сортировка
От Michael Paesold
Тема Re: Problem with 8.1 driver
Дата
Msg-id 43995155.5000301@gmx.at
обсуждение исходный текст
Ответ на Re: Problem with 8.1 driver  (Kris Jurka <books@ejurka.com>)
Список pgsql-jdbc
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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Roshan Nair
Дата:
Сообщение: Passing an array or record to a stored procedure through jdbc
Следующее
От: Michael Paesold
Дата:
Сообщение: Re: Problem with 8.1 driver