Search Postgresql Archives

Re: Custom types and JDBC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux