Function with record type as argument

Поиск
Список
Период
Сортировка
От Sean Davis
Тема Function with record type as argument
Дата
Msg-id 009E963D-84CD-11D9-A6C7-000D933565E8@mail.nih.gov
обсуждение исходный текст
Ответы Re: Function with record type as argument  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
In a followup to an earlier question from today from another person, is
it possible to create and use a function that takes as input a generic
"record"?  Specifically, how would I use a function like:

create or replace function perl_columns(record) returns text as $a$
    my ($rec)=@_;
    my $xml_ex = '';
    foreach my $tag (keys %$rec) {
        $xml_ex = "<$tag>" . $rec->{$tag} . "</$tag>\n";
    }
    return $xml_ex;
$a$ language plperlu;

Thanks,
Sean


В списке pgsql-novice по дате отправления:

Предыдущее
От: john-paul delaney
Дата:
Сообщение: Re: Query combination query.
Следующее
От: SG Edwards
Дата:
Сообщение: Perl DBI connection to Postgres