stored procedure which return a select result

From: "Alain Roger" <raf(dot)news(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: stored procedure which return a select result
Date: 2006-07-01 05:47:09
Message-ID: 75645bbb0606302247p24c66528t1c626fcac4037737@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I have some problems with a stored procedure.
In this SP, i run several SELECT statements.

1st one is to confirm that profile/account really exist into DB.
if it's ok, the 2nd statement (SELECT) is executed and should return
records.

these records should be the result of my SP.
i try the RETURNS setof record as ...

but it seems not so great...at least i have problems with it...
I've search in several books, but i did not find a real example which could
help me.

Could you give me some piece of code for such use ?
Or, if this technique is not used, could you tell me what is used for
returning a SELECT result as result of SP ?

thanks a lot

Alain

Responses

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2006-07-01 06:31:57 Re: stored procedure which return a select result
Previous Message Tom Lane 2006-07-01 03:26:06 Re: Notes on converting from MySQL 5.0.x to PostgreSQL