Skip site navigation (1) Skip section navigation (2)

Cursor names

From: Nathaniel Trellice <naptrel(at)yahoo(dot)co(dot)uk>
To: pgsql-novice(at)postgresql(dot)org
Subject: Cursor names
Date: 2010-01-11 10:11:54
Message-ID: 976377.74220.qm@web25006.mail.ukl.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-novice
Hi all,

I'm using a cursor to read query results a few rows at a time. The syntax I'm using to 'create' the cursor is:

  DECLARE <cursor name> BINARY CURSOR FOR SELECT [rest of query];

followed by calls to

  FETCH FORWARD <num rows> FROM <cursor name>

and everything's working nicely.

My DB has multiple clients each of which may have multiple connections open the the DB (the client app is threaded), all making cursored queries simultaneously.

So my question is: what are the constraints on <cursor name>? Must each cursor name be unique amongst all declared cursors from all clients, or just unique within a single connection from a single client, or something else?

Nathaniel


      


Responses

pgsql-novice by date

Next:From: Tom LaneDate: 2010-01-11 13:22:13
Subject: Re: Cursor names
Previous:From: Luis SilvaDate: 2010-01-10 23:44:17
Subject: Re: return data before the update

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group