Re: Range Types and extensions

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Range Types and extensions
Дата
Msg-id 1307467900.2402.185.camel@jdavis
обсуждение исходный текст
Ответ на Re: Range Types and extensions  (Darren Duncan <darren@darrenduncan.net>)
Ответы Re: Range Types and extensions  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Range Types and extensions  (Darren Duncan <darren@darrenduncan.net>)
Список pgsql-hackers
On Mon, 2011-06-06 at 14:42 -0700, Darren Duncan wrote:
> On this note, here's a *big* thing that needs discussion ...

[ refering to the concept of "discrete" versus "continuous" ranges ]

Yes, there has been much discussion on this topic already.

The solution right now is that they both behave like continuous ranges
for most operations. But each time a value is produced, a discrete range
has a "canonicalize" function that aligns it to the proper boundaries
and chooses a convention from [], [), (], (). For discrete ranges that's
only a convention, because multiple representations are equal in value,
but that's not so for continuous ranges.

Another approach would be to offer "next" and "prev" functions instead
of "canonical", or a "plus(thetype, integer)" and "minus(thetype,
integer)".


> Can Pg be changed to support "." in operator names as long as they don't just 
> appear by themselves?  What would this break to do so?

Someone else would have to comment on that. My feeling is that it might
create problems with qualified names, and also with PG's "arg.function"
call syntax.

> >>    foo in 1..10

> I believe it is quite reasonable to treat ranges like sets, in an abstract 
> sense, and so using set membership syntax like "in" is valid.

OK, I think I agree with this now. I'll think about it some more.

> I also see these as considerably less important and useful in practice than the 
> continuous intervals.

[ multiranges ]

Agreed. I've left those alone for now, because it's a separate concept.

Regards,Jeff Davis



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Joshua Berkus
Дата:
Сообщение: Re: reducing the overhead of frequent table locks - now, with WIP patch
Следующее
От: Tom Lane
Дата:
Сообщение: 9.1 release scheduling (was Re: reducing the overhead of frequent table locks - now, with WIP patch)