Re: Problem with CIDR data type restrictions
От | Tom Lane |
---|---|
Тема | Re: Problem with CIDR data type restrictions |
Дата | |
Msg-id | 13609.1097253423@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Problem with CIDR data type restrictions (Bruce Momjian <pgman@candle.pha.pa.us>) |
Ответы |
Re: Problem with CIDR data type restrictions
|
Список | pgsql-hackers |
Bruce Momjian <pgman@candle.pha.pa.us> writes: > Not sure how we can fix this without modifying the system tables. We can't: the only possible fix is to make inet-to-cidr not be a binary compatible conversion but instead have an actual conversion function. IMO the other direction should probably not be straight binary compatible either; instead it ought to flip the bit that says "I'm a CIDR value". So fixing this requires a couple of new functions and some pg_cast changes. Since we already forced initdb for beta4, there is a window of opportunity to do that without any extra pain for beta testers, but the fix would have to happen *now*. > Not sure how serious this is since we have gotten few complaints about > it but clearly it should be fixed. Personally I'm inclined to leave it for 8.1. The inet/cidr code is really designed around the assumption that these datatypes are interchangeable, and I suspect that enforcing a stronger distinction will actually take much more wide-ranging changes than just this. Do all of the functions on inet/cidr take care to deliver a value that is both correctly marked and declared as the correct type? I doubt it. It needs some thought not just a band-aid ... regards, tom lane
В списке pgsql-hackers по дате отправления: