Passing and reading composite values to/in a function

Поиск
Список
Период
Сортировка
От Greg
Тема Passing and reading composite values to/in a function
Дата
Msg-id 953248.10668.qm@web29705.mail.ird.yahoo.com
обсуждение исходный текст
Список pgsql-novice
Hi all,

Does anyone knows how to pass composite value to a function and read passed values in the function without declaring custom type. The passed composite value correspond to row structure defined in a View.
 
Example:
    create function Foo ( data View%ViewRowType??? ) returns void as $$
    begin
          insert into tableName values (data.FieldName);
    end; $$ language plpgsql;

Call toa function will then would look like this:
   Foo( ROW('value') );

Or is there a way to define an array that can accept combination of any data types?

Thanks.

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

Предыдущее
От: "Jean-Yves F. Barbier"
Дата:
Сообщение: log into a table
Следующее
От: Wolfgang Keller
Дата:
Сообщение: Internationalisation of database content (text columns)