Re: Singleton range constructors versus functional coercion notation

Поиск
Список
Период
Сортировка
От Dean Rasheed
Тема Re: Singleton range constructors versus functional coercion notation
Дата
Msg-id CAEZATCWhPQDbs1KeAi-QBqD7Lo3FsZbigPOCdgZKfGany4Fzag@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Singleton range constructors versus functional coercion notation  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 21 November 2011 14:55, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> On Nov 20, 2011, at 10:24 PM, Jeff Davis <pgsql@j-davis.com> wrote:
>>> Well, if there were a good shorter notation, then probably so. But it
>>> doesn't look like we have a good idea, so I'm fine with dropping it.
>
>> We should also keep in mind that people who use range types can and likely will define their own convenience
functions. If people use singletons, or open ranges, or closed ranges, or one-hour timestamp ranges frequently, they
canmake their own notational shorthand with a 3-line CREATE FUNCTION statement.  We don't need to have it all in core. 
>
> But if you believe that, what syntax do you think people are likely to
> try if they want a singleton range constructor?  Leaving the user to
> discover the problem and try to invent a workaround is not better than
> doing it ourselves ...
>

In the field of mathematics, a standard shorthand notation for the
degenerate interval [x,x] is {x} - the singleton set - so that's one
possibility.

Dean


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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: explain analyze query execution time
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: [GENERAL] VACUUM touching file but not updating relation