Re: Is there a RECORD[] type in plpgsql? - Mailing list pgsql-general

From Merlin Moncure
Subject Re: Is there a RECORD[] type in plpgsql?
Date
Msg-id b42b73150907261530s60de12a4u1aeb574b79b70668@mail.gmail.com
Whole thread Raw
In response to Re: Is there a RECORD[] type in plpgsql?  (Nick Boutelier <namethisapp@gmail.com>)
List pgsql-general
On Sun, Jul 26, 2009 at 3:30 PM, Nick Boutelier<namethisapp@gmail.com> wrote:
> Thanks Merlin, do you know what the syntax would be? Can't seem to
> find it anywhere and im getting an error using 8.3.7

You will need to create a type to represent the record contained in
the array, or use a table type (each table can also be used from a
composite type).

Inside your plpgsql function,

DECLARE
  foos foo[];
BEGIN
  select array(select * from foo) into foos;
...
:-)

merlin

pgsql-general by date:

Previous
From: Clemens Eisserer
Date:
Subject: Re: Implicit sequence with start value?
Next
From: Sam Mason
Date:
Subject: Re: Relational Algebra and Aggregate Functions