cursor name : uniqueness scope

Started by Dmitriy Agafonovover 25 years ago2 messagesgeneral
Jump to latest
#1Dmitriy Agafonov
Dmitriy.Agafonov@msdw.com

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.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Dmitriy Agafonov (#1)
Re: cursor name : uniqueness scope

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