Re: Cleaning up the INET/CIDR mess

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Cleaning up the INET/CIDR mess
Дата
Msg-id 1068.1138810484@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Cleaning up the INET/CIDR mess  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Cleaning up the INET/CIDR mess
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Backslashes in string literals