From: | Michael Fuhr <mike(at)fuhr(dot)org> |
---|---|
To: | Steve - DND <postgres(at)digitalnothing(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Pagination with Output Variables? |
Date: | 2005-02-23 00:26:57 |
Message-ID: | 20050223002657.GA80291@winnie.fuhr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Tue, Feb 22, 2005 at 04:29:30PM -0700, Steve - DND wrote:
> Can a function return two type results? So that the first type would be just
> the total number of records, and the second type would be the resultset of
> customers?
The function could return a set of cursors, one for the query that
returns the total number of records and one for the resultset. The
8.0 documentation has an example that should work in earlier versions
as well (except for the dollar quoting):
http://www.postgresql.org/docs/8.0/static/plpgsql-cursors.html
See the example at the bottom of the page.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2005-02-23 08:02:48 | Re: Speeds using a transaction vrs not |
Previous Message | Steve - DND | 2005-02-22 23:29:30 | Pagination with Output Variables? |