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: 1068.1138810484@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-02-01 16:29:11 Re: Failed install - libgen.so doesn't exist
Previous Message Bruce Momjian 2006-02-01 16:13:09 Re: Failed install - libgen.so doesn't exist