Re: Problem with CIDR data type restrictions - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Problem with CIDR data type restrictions
Date
Msg-id 4166EF12.4080402@dunslane.net
Whole thread Raw
In response to Re: Problem with CIDR data type restrictions  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Problem with CIDR data type restrictions
List pgsql-hackers

Tom Lane wrote:

>Bruce Momjian <pgman@candle.pha.pa.us> writes:
>  
>
>>Not sure how serious this is since we have gotten few complaints about
>>it but clearly it should be fixed.
>>    
>>
>
>Personally I'm inclined to leave it for 8.1.  The inet/cidr code is
>really designed around the assumption that these datatypes are
>interchangeable, and I suspect that enforcing a stronger distinction
>will actually take much more wide-ranging changes than just this.
>Do all of the functions on inet/cidr take care to deliver a value that
>is both correctly marked and declared as the correct type?  I doubt it.
>It needs some thought not just a band-aid ...
>
>
>  
>

Yeah.

I am not sure I understand the intention, but I should have thought 
there was a good case for clearing the bits past the mask on conversion 
from either text or inet, rather than rejecting or invalidly copying.

As you say, it needs some thought.

cheers

andrew


pgsql-hackers by date:

Previous
From: "Michael Paesold"
Date:
Subject: Re: Rollback on Error
Next
From: Tom Lane
Date:
Subject: Re: initdb crash