Re: calling functions which take user defined types

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Siddharth Saha <siddharthsaha(at)drishti-soft(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: calling functions which take user defined types
Date: 2010-08-25 14:30:48
Message-ID: 19612.1282746648@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Siddharth Saha <siddharthsaha(at)drishti-soft(dot)com> 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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Carel Combrink 2010-08-26 07:39:38 Display XML Table output in Browser
Previous Message Siddharth Saha 2010-08-25 12:11:23 calling functions which take user defined types