[prev in list] [next in list] [prev in thread] [next in thread]
List: postgresql-sql
Subject: Re: [SQL] Fill array with series
From: Pavel Stehule <pavel.stehule () gmail ! com>
Date: 2012-03-22 20:02:56
Message-ID: CAFj8pRD98px3qeNn79Kpx9FwTWjYBgDcWrDstbAQOm5wGVgt5A () mail ! gmail ! com
[Download RAW message or body]
Hello
no, there is nothing similar.
Regards
Pavel
2012/3/22 Lee Hachadoorian <lee.hachadoorian@gmail.com>:
> Is there a single function that will generate a series and return an array?
> The best I've come up with is to combine array_agg and generate_series:
>
> SELECT array_agg(generate_series) FROM generate_series(5, 23);
>
> array_agg
> ---------------------------------------------------------
> {5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23}
>
> Thanks,
> --Lee
>
> --
> Lee Hachadoorian
> PhD, Earth & Environmental Sciences (Geography)
> Research Associate, CUNY Center for Urban Research
> http://freecity.commons.gc.cuny.edu/
>
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic