Re: range_adjacent and discrete ranges
От | Tom Lane |
---|---|
Тема | Re: range_adjacent and discrete ranges |
Дата | |
Msg-id | 23299.1321645666@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: range_adjacent and discrete ranges (Jeff Davis <pgsql@j-davis.com>) |
Ответы |
Re: range_adjacent and discrete ranges
|
Список | pgsql-hackers |
Jeff Davis <pgsql@j-davis.com> writes: > On Fri, 2011-11-18 at 10:33 -0500, Tom Lane wrote: >> Would it be better for them to silently transform such cases to "empty"? > I wouldn't like to extend that to int4range(4,3), however. When the > upper bound is less than the lower bound, it's almost certainly a > mistake, and the user should be informed. Yeah, probably not. However, I don't like the idea of '(3,4)'::int4range throwing an error, as it currently does, because it seems to require the application to have quite a lot of knowledge of the range semantics to avoid having errors sprung on it. > By the way, what does this have to do with canonical functions? This > seems more like a constructor issue, and there is already a > zero-argument constructor to make empty ranges. What I was concerned about was whether Florian's idea of implementing range_adjacent by testing for empty intervening range would work, or would fail because of errors getting thrown. regards, tom lane
В списке pgsql-hackers по дате отправления: