plpgsql question.

From: Bill Shui <touro(at)capoeirabrasil(dot)com(dot)au>
To: pgsql-hackers(at)postgresql(dot)org
Subject: plpgsql question.
Date: 2001-10-06 04:28:22
Message-ID: 20011006142822.A9843@capoeira.sydney
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)capoeirabrasil(dot)com(dot)au
Bioinformatics Programmer

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Sabino Mullane 2001-10-06 12:00:54 psql not showing triggers
Previous Message John Summerfield 2001-10-06 00:20:11 Re: cvs problem