From: | News Subsystem <news(at)news(dot)hub(dot)org> |
---|---|
To: | undisclosed-recipients:; |
Subject: | |
Date: | 2013-01-30 04:41:59 |
Message-ID: | 201301300441.r0U4fxqU090683@news.hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Tue, 29 Jan 2013 20:41:58 -0800 (PST)
29 Jan 2013 20:41:58 -0800 (PST)
X-Newsgroups: pgsql.general
Date: Tue, 29 Jan 2013 20:41:57 -0800 (PST)
In-Reply-To: <c2fa0694-e9f2-4663-b186-0e804995b2d8(at)googlegroups(dot)com>
Complaints-To: groups-abuse(at)google(dot)com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=76.167.116.131;
posting-account=96NFGAoAAABqgpEyKCN3YH2nEalcbJuu
References: <c2fa0694-e9f2-4663-b186-0e804995b2d8(at)googlegroups(dot)com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e33dcbf7-34fb-4209-8544-f6708173825d(at)googlegroups(dot)com>
Subject: Re: Returning a range of array values?
From: Nick <nboutelier(at)gmail(dot)com>
Injection-Date: Wed, 30 Jan 2013 04:41:58 +0000
Content-Type: text/plain; charset=ISO-8859-1
To: pgsql-general(at)postgresql(dot)org
I just made one myself. Here it is in case any anyone else needs it...
CREATE FUNCTION array_range(array_var anyarray, start_var integer, end_var integer) RETURNS anyarray
LANGUAGE sql IMMUTABLE STRICT
AS $$SELECT ARRAY(SELECT array_var[gs] FROM generate_series(start_var,end_var) gs)::ANYARRAY$$;
From | Date | Subject | |
---|---|---|---|
Next Message | Groshev Andrey | 2013-01-30 05:23:22 | trouble with upgrade from 9.0 (many schemas and tables) |
Previous Message | Tim Uckun | 2013-01-30 03:59:12 | Re: Dropping default privileges. |