9.2 Range Types
9.2 Range Types
От:
Dave Bettin <me@davebettin.com>
Дата:
Does 9.2 support an array of ranges? For example, I have the following int4ranges => [0,5999) and [7000, 7999) which needs to be associated with the same record.
Thanks,
Dave
Re: 9.2 Range Types
От:
Merlin Moncure <mmoncure@gmail.com>
Дата:
On Wed, May 30, 2012 at 1:59 PM, Dave Bettin wrote:
> Does 9.2 support an array of ranges? For example, I have the following
> int4ranges => [0,5999) and [7000, 7999) which needs to be associated with
> the same record.
yup:
postgres=# select array['[0,5999)'::int4range];
array
--------------
{"[0,5999)"}
(1 row)
merlin
Re: 9.2 Range Types
От:
David Johnston <polobo@yahoo.com>
Дата:
In theory...(not running 9.2 that I could test):
{"[0,5999)","[7000,7999)"}::int4range[]
Not sure the exact type name for the int4range. The double quotes are necessary. The curly-braces surround the whole array and elements are separated by commas.
David J.
On May 30, 2012, at 14:59, Dave Bettin wrote:
> Does 9.2 support an array of ranges? For example, I have the following int4ranges => [0,5999) and [7000, 7999) which needs to be associated with the same record.
>
> Thanks,
> Dave
Re: 9.2 Range Types
От:
Dave Bettin <me@davebettin.com>
Дата:
Awesome, I will give it a try.
Thanks!
On Wed, May 30, 2012 at 1:00 PM, David Johnston <polobo@yahoo.com> wrote:
In theory...(not running 9.2 that I could test):
{"[0,5999)","[7000,7999)"}::int4range[]
Not sure the exact type name for the int4range. The double quotes are necessary. The curly-braces surround the whole array and elements are separated by commas.
David J.
On May 30, 2012, at 14:59, Dave Bettin <me@davebettin.com> wrote:
> Does 9.2 support an array of ranges? For example, I have the following int4ranges => [0,5999) and [7000, 7999) which needs to be associated with the same record.
>
> Thanks,
> Dave