calling functions which take user defined types
calling functions which take user defined types
От:
Siddharth Saha <siddharthsaha@drishti-soft.com>
Дата:
Can someone tell me how to invoke a UDF which takes a user-defined type as one of its arguments. I want to invoke the function from the command line, that is, make a variable of the user-defined type and call the function all from the command line.
Thanks & Regards,
Siddharth Saha
Thanks & Regards,
Siddharth Saha
Re: calling functions which take user defined types
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Siddharth Saha writes:
> Can someone tell me how to invoke a UDF which takes a user-defined type as
> one of its arguments.
It's not significantly different from calling functions with built-in types.
Typically you'd do
select myfunc('value', ...);
for a scalar type, or
select myfunc(row('value', 'value', ...), ...);
for a composite type.
regards, tom lane