X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3A686D94F8 for ; Mon, 3 Oct 2005 18:02:56 -0300 (ADT) 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 36569-01 for ; Mon, 3 Oct 2005 21:02:51 +0000 (GMT) Received: from mail.ev.net (unknown [132.235.215.234]) by svr1.postgresql.org (Postfix) with SMTP id 13331D7E1D for ; Mon, 3 Oct 2005 18:02:51 -0300 (ADT) Received: (qmail 19406 invoked by uid 98); 3 Oct 2005 17:08:13 +0000 Received: from 192.168.1.64 by mail.ev.net (envelope-from , uid 98) with qmail-scanner-1.25 (clamdscan: 0.87/1082. Clear:RC:1(192.168.1.64):. Processed in 0.107026 secs); 03 Oct 2005 17:08:13 -0000 X-Qmail-Scanner-Mail-From: rfrancis@ev.net via mail.ev.net X-Qmail-Scanner: 1.25 (Clear:RC:1(192.168.1.64):. Processed in 0.107026 secs) Received: from unknown (HELO ?192.168.1.64?) (192.168.1.64) by mail.ev.net with SMTP; 3 Oct 2005 17:08:12 +0000 Message-ID: <43419C7B.50801@ev.net> Date: Mon, 03 Oct 2005 17:02:51 -0400 From: Russell Francis User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Re: queries against CIDR fail against 8.0.3? References: <433BE38F.3080605@ev.net> <433C7725.1040707@opencloud.com> <433D8CA1.3050601@ev.net> <433DF50D.7060206@ev.net> <433EC9D4.9050201@ev.net> In-Reply-To: <433EC9D4.9050201@ev.net> X-Enigmail-Version: 0.89.6.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 required=5 tests=[none] X-Spam-Level: X-Archive-Number: 200510/7 X-Sequence-Number: 13938 Russell Francis wrote: > Russell Francis wrote: > >>>Seems reasonable for us to offer a PGxxx class for every core backend >>>type. Send them in and we'll take a look... >>> >>>Kris Jurka >>> >> >> >>Kris, >> >>Attached is an implementation for the proposed PGcidr & PGinet classes. >> I have tried to follow the formatting conventions used in the geometric >>extensions but is is a first attempt, please let me know if there is >>anything else I should/could do to improve these. >> >>I will take any comments / suggestions and incorporate them into the >>PGmacaddr class also. >> >>Cheers, >>Russ > > > Just realized that INET and CIDR also support IPV6 addresses too. I > feel dumb :) let me take another stab at this. Hello all, I have completed what I think is a stable and well tested addition to the JDBC driver for PG's extended network based types inet, cidr and macaddr. For anyone who is interested at the following URL http://jdbc.ev.net/ There are 7 files available for review and hopefully inclusion in the next release if they are deemed fit. A unified diff against the 8.1-dev-401 src This includes the 3 new types, 3 Test classes as well as minor modifications to AbstractJdbc2Connection.java and PGtokenizer.java ------------------------------------- PGNetworkTypes.diff Implementation of the 3 types. ------------------------------------- PGcidr.java PGinet.java PGmacaddr.java JUnit Tests of the 3 types. ------------------------------------- PGcidrTest.java PGinetTest.java PGmacaddrTest.java Please let me know if there is anything I can do to aid with this addition. Cheers, Russ