Skip site navigation (1) Skip section navigation (2)

Re: Cleaning up the INET/CIDR mess

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Cleaning up the INET/CIDR mess
Date: 2006-02-01 16:14:44
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2006-02-01 16:29:11
Subject: Re: Failed install - doesn't exist
Previous:From: Bruce MomjianDate: 2006-02-01 16:13:09
Subject: Re: Failed install - doesn't exist

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group