Re: [GENERAL] JDBC +CIDR (fwd)

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [GENERAL] JDBC +CIDR (fwd)
Date: 2004-10-21 20:45:00
Message-ID: 41781FCC.3080902@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Kris Jurka wrote:
> What kind of solution can we offer for this problem? Do we really need to
> make PGobject extensions for every type? Do we really want to force
> people to have to create these for all user defined types?

Well, you don't have to create a subclass, I think, if you don't mind
doing the parsing in the application:

PGobject dummy = new PGobject();
dummy.setType("cidr");
dummy.setValue("192.168.0.0/24");
statement.setObject(1, dummy, Types.OTHER);

Alternatively, does setString() + "?::cidr" work?

-O

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2004-10-21 22:42:17 Re: [GENERAL] JDBC +CIDR (fwd)
Previous Message Christian Niles 2004-10-21 19:53:14 Re: Calling functions with smallint fails