Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group