What type is required to capture the RETURNING from an Update?

From: rox <rox(at)tara-lu(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: What type is required to capture the RETURNING from an Update?
Date: 2011-09-14 18:50:13
Message-ID: 91bf7f4a0830f5d8cf431e5641d0c3e4@mail.webfaction.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Within 8.4, If I have an update like the following :

EXECUTE $c$
UPDATE field_seasons dr
SET season_id = ds.season_id, field_id = ds.field_id
FROM data_set ds
WHERE ds.data_set_id = dr.data_set_id
AND ds.season_id = _season_id
RETURNING field_seasons_id
$c$
INTO _id_array;

in a pgsql FUNCTION... What is the type on the variable that can accept
the list of id's?

integer[] doesn't work. It gives back "22P02 array value must start
with "{" or dimension information."

Roxanne

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2011-09-14 20:49:43 Re: What type is required to capture the RETURNING from an Update?
Previous Message Merlin Moncure 2011-09-14 14:55:08 Re: PQisBusy() always busy