pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: j.random.programmer <javadesigner@yahoo.com>
To: pgsql-jdbc@postgresql.org
Subject: User Defined Types -- Using inet/cdr from JDBC ?
Date: Mon, 20 Aug 2007 21:43:56 -0700 (PDT)
Message-ID: <214064.66714.qm@web32001.mail.mud.yahoo.com> (raw)

Hi all:

I have recently released my O/R mapping tool (molly)
at:

www.mollypages.org/dbo

Currently, this tool does not support any postgres
specific types. 
So, when doing the O/R mapping, if the JDBC Meta Data
returns:
  java.sql.Types.OTHER (1111), 
the O/R tool gives up and says:
----
Exception in thread "main" java.sql.SQLException: This
framework does not understand/support columns of this
type. [java.sql.Type: 1111]
-----

Ok so far, so good (or bad). But now I do have a need
to use:

1) inet, cdr types
2) point, circle etc types

Suppose, I have:

  create table test (my_ip_address  inet);

Looking over the JDBC docs, I see that I may to say
something 
like (in java):

1	ResultSet rs = stmt.executeQuery("select * from
test");
2	Map map = new HashMap();
3	map.put("inet", foo.class);  //string -> user
defined class
4	rs.next();
5	Object o = rs.getObject(1, map);						

The  program does not get too far. I get:

  Exception in thread "main"
org.postgresql.util.PSQLException: 
    Method 
org.postgresql.jdbc3.Jdbc3ResultSet.getObjectImpl(int,Map)
     is not yet implemented.

Any comments on the current/future ability to use
inet/cdr
types in this way ? I'm guessing I can instead use
PGpoint etc., but
what about inet/cdr ?

Best regards,
--j 




       
____________________________________________________________________________________Ready for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/



view thread (2+ messages)  latest in thread

Message-ID: <214064.66714.qm@web32001.mail.mud.yahoo.com>
Permalink:  ../214064.66714.qm@web32001.mail.mud.yahoo.com/
Also on:    postgresql.org/message-id/214064.66714.qm@web32001.mail.mud.yahoo.com

 · 

reply

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: javadesigner@yahoo.com
  Subject: Re: User Defined Types -- Using inet/cdr from JDBC ?
  In-Reply-To: <214064.66714.qm@web32001.mail.mud.yahoo.com>
  References: <214064.66714.qm@web32001.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