plpgsql question. - Mailing list pgsql-hackers

From Bill Shui
Subject plpgsql question.
Date
Msg-id 20011006142822.A9843@capoeira.sydney
Whole thread Raw
List pgsql-hackers
Hi,

I have encountered a problem with plpgsql and I would appreciated it
if anyone could help me with this.


If I have a relation say:

emp_id | salary
---------------------------
1      | 40000.00
---------------------------
2      | 45600.00
---------------------------
3      | 40000.00
---------------------------
4      | 45600.00
---------------------------
5      | 40000.00
---------------------------

my plpgsql function is to be as the following format:

get_emp_ids(float)

it takes in the salay amount and returns a list of
emp_ids that have the corresponding salary.

how should I go about doing it in plpgsql?

there's no return type that allows you to return multiple rows.

is "raise notice" the only way to display these results?


thanks in advance for your help.

ps. please also send a cc to me when replying.


Bill
-- 
Everything you know is wrong!
---------------------------------------------
Bill Shui           Email: touro@capoeirabrasil.com.au
Bioinformatics Programmer


pgsql-hackers by date:

Previous
From: John Summerfield
Date:
Subject: Re: cvs problem
Next
From: "Greg Sabino Mullane"
Date:
Subject: psql not showing triggers