Re: Cursor Example Needed - Mailing list pgsql-general

From John R Pierce
Subject Re: Cursor Example Needed
Date
Msg-id 526EEF7D.6090601@hogranch.com
Whole thread Raw
In response to Re: Cursor Example Needed  (Adrian Klaver <adrian.klaver@gmail.com>)
Responses Re: Cursor Example Needed
List pgsql-general
On 10/28/2013 3:58 PM, Adrian Klaver wrote:
> The docs do a good job of illustrating:
>
> http://www.postgresql.org/docs/9.3/interactive/plpgsql-cursors.html

thats for cursors created within a plpgsql function.

I think what the OP wants is a top level cursor, which is a different
thing...

see
http://www.postgresql.org/docs/current/static/sql-declare.html
http://www.postgresql.org/docs/current/static/sql-fetch.html
http://www.postgresql.org/docs/current/static/sql-close.html

the fetch page shows an example of the complete usage in the context of
a database transaction.


--
john r pierce                                      37N 122W
somewhere on the middle of the left coast



pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Cursor Example Needed
Next
From: Gregory Haase
Date:
Subject: json datatype and table bloat?