I have doubt about user-defined function returns value : <br /><br /> * why function returns(
accepts ) One attribute in the arguments of function/table, Otherwise it returns the whole record of the table.
Functionaccept more than arguments . <br /> * Why it doesn`t return more than one arguments in
thefunction (or) Attribute of that table. <br /><br /> * Its like same as C-language function, Because
inC function returns one value (or) structure/array of characters. <br /><br /> * My question is, In psql
user-definedfunction doesn`t returns more than one attribute. Is it possible (or) Not. <br /><br /> Some examples
:<br /> i) create function com2(text,integer) returns text as ' select city.city from city,weather <br
/> where weather.city=$1 AND city.pop>$2' language sql; <br /><br /> Res :
Returntype of the function is Text, As well as it is one of the argument of function. <br />
( At the type of returning, why it doesn`t also accepts integer ). <br />
ii) create function usrs_tab(text,integer) returns city as 'select city.city,city.pop,city.state
from city,weather where weather.city=$1 AND city.pop>$2' language sql; <br
/><br/> Res : Return one record from City table ( table contains city, pop, state only ). <br
/><br/><br /> Thanking you.<br clear="all" /><br />-- <br
/>sathiyamoorthy