Re: Substitute a variable in PL/PGSQL.

Поиск
Список
Период
Сортировка
От Steve Martin
Тема Re: Substitute a variable in PL/PGSQL.
Дата
Msg-id 48880CCB.7030804@nec.co.nz
обсуждение исходный текст
Ответ на Substitute a variable in PL/PGSQL.  (Steve Martin <steve.martin@nec.co.nz>)
Список 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 по дате отправления:

Предыдущее
От: Shane Ambler
Дата:
Сообщение: Re: A couple of newbie questions ...
Следующее
От: "Jonathan Bond-Caron"
Дата:
Сообщение: Re: Full text index without accents