Re: Custom types and JDBC
От | Adrian Klaver |
---|---|
Тема | Re: Custom types and JDBC |
Дата | |
Msg-id | 4DCAAC12.6020006@gmail.com обсуждение исходный текст |
Ответ на | Re: Custom types and JDBC (mephysto <gennaria@email.it>) |
Список | pgsql-general |
On 05/11/2011 08:03 AM, mephysto wrote: > Mmmmm no, > my goal is for example: define a typeFoo (id as int, name as varchar) in > postgres, define an object in java objFoo (id as int, name string), define a > stored function in posgres return a typeFoo > > > create ora replace function getFoo() returns typeFoo as > $$ > begin > ...... > end; > $$ > > I would to connect postgres by jdbc and call stored function getFoo. A this > poin I would set properties of objFoo (id and name) with id and name > retrieved from stored function. > > Is resultset the only way to achieve this goal? As far as I can tell, yes. If the values for id and name never changed you could just hard code them as properties of objFoo. Assuming that the function getFoo() changes the values, the only way you can know what the new values are is query the database and get them from the result set. > > Thanks. > > Meph > -- Adrian Klaver adrian.klaver@gmail.com
В списке pgsql-general по дате отправления: