Re: Correct way to send a composite type to Postgres

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: Correct way to send a composite type to Postgres
Дата
Msg-id alpine.BSO.2.00.1002180011520.30823@leary.csoft.net
обсуждение исходный текст
Ответ на Correct way to send a composite type to Postgres  (Jason Tesser <jasontesser@gmail.com>)
Ответы Re: Correct way to send a composite type to Postgres  (Jason Tesser <jasontesser@gmail.com>)
Список pgsql-jdbc

On Tue, 16 Feb 2010, Jason Tesser wrote:

> I have a composite type that is an IN parameter for a Stored Function.  How
> do I construct the type in Java?
>
> I know in Postgres I can do row(....)  I was hoping for something a little
> more Javaish instead to having to build that String.
>
> Can I extend PGObject to accomplish this?

Currently there isn't a great way to do this with the PG JDBC driver.  You
can encapsulate the ugliness with PGObject, but you can't avoid it.  If
you have a type that extends PGObject all you need to do is override the
toString method to format the data as the server expects it.

Kris Jurka

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

Предыдущее
От: list_usr@spacebox.net
Дата:
Сообщение: Column is of type date but expression is of type text
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: Column is of type date but expression is of type text