Re: SELECT INTO an array - Mailing list pgsql-novice

From Josh Berkus
Subject Re: SELECT INTO an array
Date
Msg-id web-1393116@davinci.ethosmedia.com
Whole thread Raw
In response to SELECT INTO an array  (Alberto Bolchini <alberto@melloni49.it>)
List pgsql-novice
Alberto,

> I'm trying to write a PLPGSQL Function using an array as an internal
> variable, but I don't seem to succeed:
>
> CREATE FUNCTION ... RETURNS ... AS '
> DECLARE
>   l_record integer[2];
> BEGIN
>   SELECT INTO l_record col01, col02 FROM table01 WHERE ...;

You don't want an array for the above.  You want a RECORD.

-Josh

pgsql-novice by date:

Previous
From: "Slawek Jarosz"
Date:
Subject: Forte for Java & Postgres
Next
From: Alberto Bolchini
Date:
Subject: [Fwd: Re: SELECT INTO an array]