From: CG <cgg007@yahoo.com>
To: pgsql-jdbc@postgresql.org
Subject: Custom type woes
Date: Wed, 28 Jun 2006 09:33:01 -0700 (PDT)
Message-ID: <20060628163301.81236.qmail@web37912.mail.mud.yahoo.com> (raw)
I'm trying to use the datatype defined in the uniqueidentifier contrib module
from within my java application. I had originally thought I would process the
values in java as strings, but I can't insert the values back into a table
becuase I can't figure out how to create an explicit cast. I had hoped that the
automatic type conversion would work, but it doesn't in the case of insert, or
in function parameters.
My next idea was to add the type to JDBC a la Money and Interval. I've never
worked with JDBC drivers before, so I just guessed at what it would take. I
created the java class PGuniqueidentifier and modeled it after the other
classes in org.postgresql.util. I linked it up along with all the other odd
types in org.postgresql.jdbc2.AbstractJdbc2Connection ... That didn't work
either.
SQLWorkbench reports columns of uniqueidentifier as java sql type OTHER ...
So, I need a kick in the right direction.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: cgg007@yahoo.com
Subject: Re: Custom type woes
In-Reply-To: <20060628163301.81236.qmail@web37912.mail.mud.yahoo.com>
References: <20060628163301.81236.qmail@web37912.mail.mud.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox