Thread: Passing and reading composite values to/in a function

Passing and reading composite values to/in a function

From
Greg
Date:
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.