Re: [GENERAL] Confused about a function returning SETOF

2006-03-22 Thread Ken Winter
Well, duh! Thank you. I could have stared at it for hours without seeing it... > -Original Message- > From: Tom Lane [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 21, 2006 11:12 PM > To: [EMAIL PROTECTED] > Cc: PostgreSQL pg-general List > Subject: Re: [GENERAL

Re: [GENERAL] Confused about a function returning SETOF

2006-03-21 Thread Tom Lane
"Ken Winter" <[EMAIL PROTECTED]> writes: > select lov_personinorganization_role_status('Student','Applicant'); > ERROR: set-valued function called in context that cannot accept a set You need to write select * from lov_personinorganization_role_status('Student','Applicant');

[GENERAL] Confused about a function returning SETOF

2006-03-21 Thread Ken Winter
I have the following function:   CREATE or REPLACE FUNCTION public.lov_personinorganization_role_status( varchar, varchar) RETURNS SETOF person_status_in_organization AS $BODY$ DECLARE     rec person_status_in_organization%ROWTYPE;     role ALIAS FOR $1;     from_status ALIAS FOR