Home > Archive > PostgreSQL JDBC > January 2006 > getObject and userDefined dataTypes









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author getObject and userDefined dataTypes
Assad Jarrahian

2006-01-09, 3:24 am

Hi all,
I have a question regarding userdefinedtype columns and retieving them.

I have in the db:
I have a db type called address.
CREATE TYPE address AS
(bldgname varchar,
bldgzone varchar,
bldgfloor varchar,
bldgroom varchar,
street varchar,
crossing1 varchar,
crossing2 varchar,
city varchar,
state varchar,
zip varchar,
district varchar,
county varchar,
country varchar,
countrycode varchar,
phonenumber varchar,
ext varchar,
url varchar);

I also have a java class called Address (exact same thing) that I am
trying to read the data into.

Currently I am using
SELECT all_the_other_column
s, (address).bldgname , (address).bldgzone ....
and then I use the Address class set methods

would it be easier/more-efficient to do this using getObject or
something else. If so, how?

much thanks in advance.

-assad

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com