Help making a plpgsql function?

From: Bjørn T Johansen <btj(at)havleik(dot)no>
To: pgsql-general(at)postgresql(dot)org
Subject: Help making a plpgsql function?
Date: 2006-07-05 14:46:55
Message-ID: 20060705164655.5a9f502b@pennywise
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)havleik(dot)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"
-----------------------------------------------------------------------------------------------

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Szymic1 2006-07-05 14:48:21 Re: How to hide NOTICE messages in psql.exe ?
Previous Message Marco Bizzarri 2006-07-05 14:43:22 Dumping in LATIN1 and restoring in UTF-8