plpgsql question.

Поиск
Список
Период
Сортировка
От Bill Shui
Тема plpgsql question.
Дата
Msg-id 20011006142822.A9843@capoeira.sydney
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: John Summerfield
Дата:
Сообщение: Re: cvs problem
Следующее
От: "Greg Sabino Mullane"
Дата:
Сообщение: psql not showing triggers