Re: Is there a RECORD[] type in plpgsql?

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Nick Boutelier <namethisapp(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Is there a RECORD[] type in plpgsql?
Date: 2009-07-26 22:30:14
Message-ID: b42b73150907261530s60de12a4u1aeb574b79b70668@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Jul 26, 2009 at 3:30 PM, Nick Boutelier<namethisapp(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sam Mason 2009-07-26 23:02:14 Re: Relational Algebra and Aggregate Functions
Previous Message Clemens Eisserer 2009-07-26 20:12:48 Re: Implicit sequence with start value?