Re: uniqueness not always correct

Поиск
Список
Период
Сортировка
Искать
От
Peter Eisentraut
Тема
Re: uniqueness not always correct
Дата
Msg-id
Pine.LNX.4.21.0006020351140.372-100000@localhost.localdomain
Ответ на
Список
Дерево обсуждения
Re: [BUGS] uniqueness not always correct Vadim Mikheev <vadim@krs.ru>
Re: [HACKERS] Re: [BUGS] uniqueness not always correct Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Re: [BUGS] uniqueness not always correct Frank Cusack <fcusack@iconnet.net>
Re: [HACKERS] Re: [BUGS] uniqueness not always correct Bruce Momjian <pgman@candle.pha.pa.us>
Re: [HACKERS] Re: [BUGS] uniqueness not always correct Bruce Momjian <pgman@candle.pha.pa.us>
Re: [HACKERS] Re: [BUGS] uniqueness not always correct Bruce Momjian <pgman@candle.pha.pa.us>
Re: [HACKERS] Re: [BUGS] uniqueness not always correct Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Re: [BUGS] uniqueness not always correct Bruce Momjian <pgman@candle.pha.pa.us>
Re: [BUGS] uniqueness not always correct Bruce Momjian <pgman@candle.pha.pa.us>
Re: [BUGS] uniqueness not always correct Bruce Momjian <pgman@candle.pha.pa.us>
Re: uniqueness not always correct Bruce Momjian <pgman@candle.pha.pa.us>
Re: uniqueness not always correct Bruce Momjian <pgman@candle.pha.pa.us>
Tom Lane writes:

[CIDR and INET]
> Alternatively, if no one cares enough about these types to even
> understand what they should do, maybe we should rip 'em out?

Actually, I'm a happy user of these types, so that would certainly make me
unhappy...

CIDR stores network addresses, so '10.8/16' might be some network. INET
stores both host addresses and, optionally, the network it's in, so
'10.8.7.6/16' is the given host in the network '10.8/16'. Alternatively,
INET '10.8.7.6' is just a host with no network. IMO, there is one of two
bugs in the CIDR input routine:

1) '10.8.7.6/16' in not rejected

2) Since it is accepted, at least the hidden fields need to be zeroed.

(But note that this bug is only exposed when you use the type improperly
in the first place.)

Using the same operators for cidr and inet is fine as long as this is
fixed.


-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden
В списке pgsql-bugs по дате отправления
От: Bruce Momjian
Дата:
От: Peter Eisentraut
Дата:
FAQ