Re: DatabaseMetaData and Transactions

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: DatabaseMetaData and Transactions
Дата
Msg-id 42A613DA.7090300@opencloud.com
обсуждение исходный текст
Ответ на Re: DatabaseMetaData and Transactions  (Carl Olivier <carl@zero-one.co.za>)
Ответы Re: DatabaseMetaData and Transactions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-jdbc
Carl Olivier wrote:

> Now - the reason we do a setString(index, null) and not a setNull(index,
> Types.SOME_TYPE) is because this method is generic and does not always KNOW
> the datatypes for the columns.

> ERROR: column "created_by" is of type integer but expression is of type
> character varying

> Does anyone have any comments/suggestions/etc?  Is there any way to get
> around this?  Or will we need to update our side to always pass in the
> column meta data etc for use?

You're going to have to pass metadata down, or change your queries to
explicitly cast the parameters in the SQL itself. The driver has exactly
the same problem as your code does -- with the v3 protocol it needs to
provide a type for the parameter, but if it's just provided as a string
the only type it can assume is text..

-O

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

Предыдущее
От: Sathyajith G
Дата:
Сообщение: Re: exception while upgrading driver
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: 8.x driver with EJB CMP