X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 97DDC32A482 for ; Thu, 21 Oct 2004 21:45:24 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 56077-06 for ; Thu, 21 Oct 2004 20:45:13 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id D96B232A488 for ; Thu, 21 Oct 2004 21:45:12 +0100 (BST) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=opencloud.com) by yass.opencloud.co.nz with asmtp (Exim 3.35 #1 (Debian)) id 1CKjo1-00035l-00; Fri, 22 Oct 2004 09:45:05 +1300 Message-ID: <41781FCC.3080902@opencloud.com> Date: Fri, 22 Oct 2004 09:45:00 +1300 From: Oliver Jowett User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kris Jurka Cc: pgsql-jdbc@postgresql.org Subject: Re: [GENERAL] JDBC +CIDR (fwd) References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/225 X-Sequence-Number: 11330 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