From: | Charles Simard <tech(at)denarius(dot)ca> |
---|---|
To: | 'Hendra' <manusiatidakbiasa(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Hi there, new here and have question |
Date: | 2008-07-08 17:13:55 |
Message-ID: | E6AE5AD88D55B543A0A97FF0B93AA9E9621F58@TRADE200.DENARIUS.CA |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
|>
|> -----Original Message-----
|> From: pgsql-general-owner(at)postgresql(dot)org [mailto:pgsql-general-owner(at)postgresql(dot)org]On Behalf Of Hendra
|> Sent: 8 juillet 2008 02:59
|> To: pgsql-general(at)postgresql(dot)org
|> Subject: [GENERAL] Hi there, new here and have question
|>
|> Hi Everyone.
|> I'm just subscribe to the mailing list
|> I'm new to Postgresql and
|> I have a question
|>
|> I intend to make a function that returns more than a row
|> I tried something like below
|>
|> create function listofemployeebasedondepartment(id_dept int) $$
|> declare
|> resultset ??;
|> begin
|> select * into resultset from employee where id_dept = id_dept;
|> return resultset;
|> end
|> $$ language 'plpgsql';
|>
|> I believe you get what I want
|> But I just couldn't finish the code since I miss something
|> I manage to find 'setof' but have no idea on how to use it
|>
|> Any suggestion everyone?
|>
|> Thank you,
|> Regards,
|> Hendra
I believe you are looking for this:
http://www.postgresql.org/docs/8.3/interactive/xfunc-sql.html#AEN40331
Good day,
Charles Simard
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-07-08 18:11:32 | Re: PG_MODULE_MAGIC lost if strip the object file |
Previous Message | Josh Berkus | 2008-07-08 17:13:13 | Re: Sign up for PDXPUG PgDay! July 20, 2008 |