Re: display cursor contents

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: "Steve P Shiflett" <Steve(dot)P(dot)Shiflett(at)macys(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: display cursor contents
Date: 2007-04-15 17:42:07
Message-ID: b42b73150704151042m506327d4g4a6574ab8bf07b6f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 4/13/07, Steve P Shiflett <Steve(dot)P(dot)Shiflett(at)macys(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-04-15 19:40:48 Re: pg_dump seg fault on sequences
Previous Message Michael Nolan 2007-04-15 17:17:12 Re: pg_dump seg fault on sequences