setString and timestamps

Поиск
Список
Период
Сортировка
От David Goodenough
Тема setString and timestamps
Дата
Msg-id 200602171607.18071.david.goodenough@btconnect.com
обсуждение исходный текст
Ответы Re: setString and timestamps
Список pgsql-jdbc
I understand from looking at the archive that there some changes around
8.0 in this area, but I am confused as to how to proceed.

I have some code which takes a table and inserts values into it where the
values have come from XML and are thus all strings.  Some of these XML
fields are timestamps, but this generic code does not have table specific
knowledge.

From what I have read I think I have to use something like the metadata
for this table to find the type of this column, and if it is a timestamp then
I need to take the string and convert it into a timestamp before I set it
into the parameterized insert.  Is this right, and are there any other
datatypes which are not implicitly converted from String to whatever is
necessary?

If it is only timestamps, why are they singled out for this special treatment?

Also there was some question about the difference between timestamps
with and without zone, mine are without should that make a difference.

Is there a HOWTO about this somewhere?

David

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

Предыдущее
От: "Scot P. Floess"
Дата:
Сообщение: unsubscribe
Следующее
От: Tom Lane
Дата:
Сообщение: 7.4 JDBC driver with 8.1 server?