Thread: cursor name : uniqueness scope

cursor name : uniqueness scope

From
Dmitriy Agafonov
Date:
Stupid question - what's the uniqueness scope of a cursor name. Is it
connection (as, I assume, it's supposed to be) or is it something else
(database, server, client, ...) ?  I am accessing the database using C
API thru a set of C++ wrappers, which I wrote myself (the standard ones
weren't satisfactory) and I am currently retrieving the stringified
data, which I convert to a particular datatype using sscanf. I'd like to
improve the performance of my application by retrieving the binary data
directly.  AFAIK the only way to do that is by using a binary cursor (is
it gonna change in 7.1, by the way?). I don't want to specify the cursor
name explicitely every time I need to do a select. Instead I'm going to
use a simple name generator. I just need to know what it is supposed to
be associated with - a connection, client, database...

Thank you,
Dmitriy Agafonov.



Re: cursor name : uniqueness scope

From
Tom Lane
Date:
Dmitriy Agafonov <Dmitriy.Agafonov@msdw.com> writes:
> Stupid question - what's the uniqueness scope of a cursor name. Is it
> connection (as, I assume, it's supposed to be)

Yup, per-connection (actually per-transaction, since cursors don't
survive across transactions).

            regards, tom lane