X-Original-To: pgsql-jdbc-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id BB5AA9FA425 for ; Wed, 28 Jun 2006 13:33:10 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 94882-01 for ; Wed, 28 Jun 2006 13:33:02 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from web37912.mail.mud.yahoo.com (web37912.mail.mud.yahoo.com [209.191.124.107]) by postgresql.org (Postfix) with SMTP id 1B18C9FA319 for ; Wed, 28 Jun 2006 13:33:01 -0300 (ADT) Received: (qmail 81238 invoked by uid 60001); 28 Jun 2006 16:33:01 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=gEZwHgpwmy7ybmp27VWNkhWlbOrnf6JV+uQ/CfdfDi15kcxj5VQKI5GOrFQfvGsgz/NO1G0xyVHjSXt+Fp26MIhVQZMyNabsjav9C6F8NgYIKBpXFUVBR+MvCb3tO2AgYyyE8d/y7U3EdW8hoMnq4AQh+9kf4YfGBDZ5gc1lCC0= ; Message-ID: <20060628163301.81236.qmail@web37912.mail.mud.yahoo.com> Received: from [216.173.173.66] by web37912.mail.mud.yahoo.com via HTTP; Wed, 28 Jun 2006 09:33:01 PDT Date: Wed, 28 Jun 2006 09:33:01 -0700 (PDT) From: CG Reply-To: cgg007@yahoo.com Subject: Custom type woes To: pgsql-jdbc@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/126 X-Sequence-Number: 15406 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