Re: WIP: RangeTypes
От | Jeff Davis |
---|---|
Тема | Re: WIP: RangeTypes |
Дата | |
Msg-id | 1296236932.11513.496.camel@jdavis обсуждение исходный текст |
Ответ на | Re: WIP: RangeTypes (David Fetter <david@fetter.org>) |
Ответы |
Re: WIP: RangeTypes
Re: WIP: RangeTypes |
Список | pgsql-hackers |
On Fri, 2011-01-28 at 09:17 -0800, David Fetter wrote: > For consistency, and in order not to continue our atrocious naming > tradition, I'd like to propose that the above be named timestamprange > (tsrange for short) and timestamptzrange (tstzrange for short). No real objection, but I'd like to see if someone else will second it. Also, I don't think aliases are very easy to define. They appear to all be special cases in the backend code, without catalog support. Should I use domains? If not, I think we'll have to stick to one name. > > - INTRANGE (int4) > > int4range/intrange and the missing bigintrange/int8range I thought about adding int8range, and the first time around that's what I tried. But then I realized that the literal "4" is interpreted as an int4, meaning that "range(1,10)" would be interpreted as int4range, so int8range was slightly annoying to use because you have to cast the literals. Also, the storage is not particularly efficient right now anyway, so if you need int8range, you could probably use numrange instead. I don't mind either way. If you think someone will use it, I'll add it. > Should there also be a timerange and a timetzrange? I thought about it, and I realized that I've never seen the "time" type used. Again, I'll add it if someone will use it. Keep in mind that it's fairly easy for people to add their own range types. The most difficult part is defining the "canonical" function if it is applicable, and the "subtype_float" function which is necessary for GiST. Regards,Jeff Davis
В списке pgsql-hackers по дате отправления: