Help making a plpgsql function? - Mailing list pgsql-general

From Bjørn T Johansen
Subject Help making a plpgsql function?
Date
Msg-id 20060705164655.5a9f502b@pennywise
Whole thread Raw
Responses Re: Help making a plpgsql function?  (Dany De Bontridder <dany@alchimerys.be>)
List pgsql-general
I need to make a funtion that take one parameter and then returns a "record" with x number of fields,
collected from x no. of tables, i.e. I need to run several sql statemtents to collect all the needed values
from x no. of fields and insert it into a "record" and return the "record" at the end...

Can someone get me started? I have not written many function in plpgsql before, so any help is appreciated...
(how to a create the return "record", etc?)

btw, I am using PostgreSQL 7.4 (will be upgrading to 8.1 after the summer but need a function working for 7.4
first...)



Regards,

BTJ

--
-----------------------------------------------------------------------------------------------
Bjørn T Johansen

btj@havleik.no
-----------------------------------------------------------------------------------------------
Someone wrote:
"I understand that if you play a Windows CD backwards you hear strange Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"
-----------------------------------------------------------------------------------------------

pgsql-general by date:

Previous
From: "Marco Bizzarri"
Date:
Subject: Dumping in LATIN1 and restoring in UTF-8
Next
From: Scott Marlowe
Date:
Subject: Re: pgsql vs mysql