Re: postgres - development of inet/cidr

From: darcy(at)druid(dot)net (D'Arcy J(dot)M(dot) Cain)
To: Jakub Bartosz Bielecki <J(dot)B(dot)Bielecki(at)elka(dot)pw(dot)edu(dot)pl>
Cc: pgsql-hackers(at)PostgreSQL(dot)org
Subject: Re: postgres - development of inet/cidr
Date: 2000-06-30 11:54:41
Message-ID: m137zNZ-000AUWC@druid.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thus spake Jakub Bartosz Bielecki
> I'm not really into PostgreSQL development, first of all.
> However once I have needed to use INET type
> in my database and (sadly) I noticed 2 very serious bugs:
>
> 1. all functions which return text (host, network etc) should
> return pascal-like ASCII string not C-like ASCIIZ
> example:
> select host('10.0.0.1')='10.0.0.1'; -- this returns false!
>
> 2. inet comparison routines (and thus operators) work in a strange way
> if I set netmask length to a non-default value (other than 32).
> example:
> select '10.0.0.1/27'::inet='10.0.0.2/27'::inet; -- returns true
> I guess that this behaviour is different from described in manual.
> And if it's right, then in surce code is 1 function which behaves
> in an opposite way, messing the whole thing up...
>
> I noticed these in Pg 6.5.3, however when I checked apropriate source file
> in Pg 7.0, to my suprise it was not fixed...
>
> OK. Now my questions:
> - am I right?
> - are you working on it?
> - if not, should I fix it myself and send a patch to developers?
> (I really dont feel like duplicating someones work)

I am working on different things right now so go ahead but do discuss your
proposed changes on hackers first (pgsql-hackers(at)PostgreSQL(dot)org) as there
was quite a lot of discussion at the time about how it should work.

--
D'Arcy J.M. Cain <darcy(at){druid|vex}.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Philip Warner 2000-06-30 11:57:46 Minor buglet in update...from (I think)
Previous Message Adriaan Joubert 2000-06-30 08:04:11 copy binary from stdin; Why is it broken?