function returning a cursor and a scalar

From: "Surajit Bhattacharjee" <surajitb(at)virtusa(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: function returning a cursor and a scalar
Date: 2009-07-13 03:07:15
Message-ID: 75F63F40B35C3144854E90019EB086770DDC0229@ws-mailsvr.Virtusa.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I am new to Postgresql and am trying to write a function which will do a
search and return the first page of results along with the total number
of matches. How can I make my function return a cursor AND a scalar -
can I do the scalar as an OUT param and then make the function
explicitly RETURN a refcursor?

Surajit

---------------------------------------------------------------------------------------------

This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is intended for the addressee only. Any unauthorized disclosure, use, dissemination, copying, or distribution of this message or any of its attachments or the information contained in this e-mail, or the taking of any action based on it, is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail and delete this message.

---------------------------------------------------------------------------------------------

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Gary Stainburn 2009-07-13 10:34:14 simple join is beating me
Previous Message Philippe Lang 2009-07-10 13:05:49 Re: WITH RECURSION output ordering with trees