| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера