How to remove n-first elements from array?

From: aasat <satriani(at)veranet(dot)pl>
To: pgsql-general(at)postgresql(dot)org
Subject: How to remove n-first elements from array?
Date: 2012-12-16 16:01:12
Message-ID: 1355673672918-5736765.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I have array for example

do $$
declare
v_arr integer[] := array[1, 2, 3, 4, 5];
begin
end;
$$

I want to remove 2 first element and get array with non-changed indexes
(subscript)

new array := '[3:5]={3, 4, 5}'::integer[]

It is possible in pl/pgsql?

--
View this message in context: http://postgresql.1045698.n5.nabble.com/How-to-remove-n-first-elements-from-array-tp5736765.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Bex 2012-12-16 16:24:13 Re: Authenticate with hash instead of plaintext password?
Previous Message Murray Cumming 2012-12-16 15:54:30 Authenticate with hash instead of plaintext password?