Re: Cleaning up the INET/CIDR mess - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Cleaning up the INET/CIDR mess
Date
Msg-id 1068.1138810484@sss.pgh.pa.us
Whole thread Raw
In response to Re: Cleaning up the INET/CIDR mess  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Is it only implicit casts you are worried about?  Do we have any of
> those left?  All functions that take cidr also have an inet version, so
> I don't see how an implicit cast to cidr could happen.

The cast to cidr isn't implicit anymore anyway.  What I currently have
it marked as is "assignment".  You could make the argument that it
should be marked "explicit only" to avoid silent loss of data.  But
we have the numeric downcasts marked as "assignment" so I don't see
why this case is different.  If you do
insert into int4_tbl values(7.7);

what's inserted into the integer column is 8, and I've not heard anyone
complaining that that represents unacceptable data loss.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Cleaning up the INET/CIDR mess
Next
From: Bruce Momjian
Date:
Subject: Re: Backslashes in string literals