Re: display cursor contents - Mailing list pgsql-general

From Merlin Moncure
Subject Re: display cursor contents
Date
Msg-id b42b73150704151042m506327d4g4a6574ab8bf07b6f@mail.gmail.com
Whole thread Raw
In response to display cursor contents  (Steve P Shiflett <Steve.P.Shiflett@macys.com>)
List pgsql-general
On 4/13/07, Steve P Shiflett <Steve.P.Shiflett@macys.com> wrote:
>
> I wish to display the output of a cursor but haven't discovered the trick.
> Here's what I'm doing:
>
>

According to the documentation, you can fetch from a returned
refcursor like this:

FETCH ALL IN "<unnamed cursor 1>";

You can name the refcusor inside your function like this:

my_cursor refcursor default 'something';

which makes it easier to get from sql script from a known name.

merlin

pgsql-general by date:

Previous
From: "Michael Nolan"
Date:
Subject: Re: pg_dump seg fault on sequences
Next
From: Tom Lane
Date:
Subject: Re: pg_dump seg fault on sequences