Re: Substitute a variable in PL/PGSQL. - Mailing list pgsql-general

From Steve Martin
Subject Re: Substitute a variable in PL/PGSQL.
Date
Msg-id 48880CCB.7030804@nec.co.nz
Whole thread Raw
In response to Substitute a variable in PL/PGSQL.  (Steve Martin <steve.martin@nec.co.nz>)
List pgsql-general
Merlin Moncure wrote:

>On Wed, Jul 23, 2008 at 4:08 AM, Klint Gore <kgore4@une.edu.au> wrote:
>
>
>here is a way to do it with record variables...no inner loop but
>doesn't the column names.  with a little work you could add those with
>some queries to information_schema (i don't think it's worth it
>though).
>
>create or replace function ff(tablename text) returns setof text as
>$$
>  declare
>    r record;
>  begin
>    for r in
>      execute 'select record_out(' || tablename || ') as f' ||
>        ' from ' || tablename loop
>      return next r.f;
>    end loop;
>  end;
>$$ language plpgsql;
>
>merlin
>
>
>
Hi Merlin,

Where can I find out more on the record_out function?

Steve M.


pgsql-general by date:

Previous
From: Shane Ambler
Date:
Subject: Re: A couple of newbie questions ...
Next
From: "Jonathan Bond-Caron"
Date:
Subject: Re: Full text index without accents