On Thu, 28 Nov 2019 09:58:50 -0500, Tom Lane <tgl@xxxxxxxxxxxxx> wrote: >Matthias Apitz <guru@xxxxxxxxxxx> writes: >> When an ESQL/C written process issues a >> EXEC SQL DISCONNECT [connection]; >> do the opened CURSOR(s) still survive? > >No. Cursors are purely session-local objects in Postgres. >I'm a bit surprised to hear it might be different in Sybase. > > regards, tom lane > Sybase has a different notion of "session" that permits multiple connections, and certain per session objects such as temp tables can (optionally) be shared among all connections to the same session. I'm not sure whether cursors similarly can be shared. Sybase allows cursors and temp tables to be statically declared in the schema DDL. Declared cursors and temp tables do not need to be "created" explicitly - if they do not already exist, they can be instantiated simply by mention in a query. I have never tried sharing a cursor (or even using a declared cursor). Queries in Sybase are *connection* specific, so I would think it would be an error for multiple queries to try to reference the same cursor name simultaneously. But I haven't worked with Sybase for some years so I am not up to date on the current software. George