Re: queries against CIDR fail against 8.0.3?

From: Russell Francis <rfrancis(at)ev(dot)net>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: queries against CIDR fail against 8.0.3?
Date: 2005-10-10 12:59:31
Message-ID: 434A65B3.2000504@ev.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Kris Jurka wrote:
>
>
> On Mon, 3 Oct 2005, Russell Francis wrote:
>
>> 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.
>>
>
> I haven't fully reviewed this patch, but I'm going on vacation for two
> weeks tomorrow, so I wanted to at least get back to you with my initial
> observations.

Kris,

Thanks for taking a partial look at it, I think your comments give me
enough insight to make another attempt and ensure it will compile
against jdk1.2.

> 1) It fails to pass the tests you've provided:
>
> [junit] Testcase:
> testPGinetIPv4InvalidAddresses(org.postgresql.test.net.PGinetTest):
> FAILED
> [junit] An invalid address was turned into a PGinet object:
> 255.255.1/23' failed.
> [junit] junit.framework.AssertionFailedError: An invalid address was
> turned into a PGinet object: 255.255.1/23' failed.
> [junit] at
> org.postgresql.test.net.PGinetTest.testPGinetIPv4InvalidAddresses(PGinetTest.java:70)

This is strange, I am unable to duplicate this on my machine (FreeBSD/jdk1.4.2/x86)
I will see if I can duplicate this on a different machine. Out of curiosity, what
OS/jdk/cpu are you using?

>
> 2) It uses Inet[4|6]Address which is only available in JDK1.4+ while the
> driver must compile with JDK1.2.
>

Good point, I wasn't aware of that but I guess I won't be able to use the InetAddress
classes.

I will try to have another version of this patch which addresses the above issues
for you when you get back from your vacation.

Cheers,
Russ

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Hector Rosas 2005-10-12 19:10:41 About Connections and PreparedStatements
Previous Message Oliver Jowett 2005-10-10 06:26:03 Re: Exception in Boolean to int2 conversion in xwiki??