getObject and userDefined dataTypes

From: Assad Jarrahian <jarraa(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: getObject and userDefined dataTypes
Date: 2006-01-07 22:29:07
Message-ID: 4bd3e1480601071429w5d2778a6i98b1a977a3da55a6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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_columns, (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

Browse pgsql-jdbc by date

  From Date Subject
Next Message Assad Jarrahian 2006-01-08 03:28:28 SQLData user-defined-types and getObject()
Previous Message Dave Cramer 2006-01-06 19:19:01 Re: Out Parameter Support