Re: Range Types and extensions
От | Merlin Moncure |
---|---|
Тема | Re: Range Types and extensions |
Дата | |
Msg-id | BANLkTikGwZXnJ=d-WkwWFdwM00cN6QZkwg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Range Types and extensions (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Range Types and extensions
|
Список | pgsql-hackers |
On Mon, Jun 6, 2011 at 6:23 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Merlin Moncure <mmoncure@gmail.com> writes: >> I vote for at minimum the type itself and ANYRANGE to be in core. >> From there you could make it like arrays where the range type is >> automatically generated for each POD type. I would consider that for >> sure on basis of simplicity in user-land unless all the extra types >> and operators are a performance hit. > > Auto-generation of range types isn't going to happen, simply because the > range type needs more information than is provided by the base type > declaration. (First, you need a btree opclass, and second, you need a > "next" function if it's a discrete type.) > > By my count there are only about 20 datatypes in core for which it looks > sensible to provide a range type (ie, it's a non-deprecated, > non-composite type with a standard default btree opclass). For that > many, we might as well just build 'em in. right. hm -- can you have multiple range type definitions for a particular type? I was thinking about a type reduction for casting like we have for arrays: select '[1,3)'::int{}. but maybe that isn't specific enough? merlin
В списке pgsql-hackers по дате отправления: