Re: status of CURSORs after DISCONNECT

Поиск
Список
Период
Сортировка
От George Neuner
Тема Re: status of CURSORs after DISCONNECT
Дата
Msg-id 2pb0ue5ao2d9jj2ldsdhse96rod9haluac@4ax.com
обсуждение исходный текст
Ответ на status of CURSORs after DISCONNECT  (Matthias Apitz <guru@unixarea.de>)
Список pgsql-general
On Thu, 28 Nov 2019 09:58:50 -0500, Tom Lane <tgl@sss.pgh.pa.us>
wrote:

>Matthias Apitz <guru@unixarea.de> 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




В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Rows violating Foreign key constraint exists
Следующее
От: Antonio Silva
Дата:
Сообщение: using replace function