Re: BUG #2069: Cursors are not close outside of a function
От | Jaime Casanova |
---|---|
Тема | Re: BUG #2069: Cursors are not close outside of a function |
Дата | |
Msg-id | c2d9e70e0511250758p31551653g36a570234be8d613@mail.gmail.com обсуждение исходный текст |
Ответ на | BUG #2069: Cursors are not close outside of a function ("Hubert FONGARNAND" <h.fongarnand@fiducial.fr>) |
Список | pgsql-bugs |
On 11/24/05, Hubert FONGARNAND <h.fongarnand@fiducial.fr> wrote: > Note that i don't close c1 after returning... > (c1 should be close automatically because it is declared inside my > function); > =46rom the manual (signs are mine)... 35.8.3.3. Returning Cursors PL/pgSQL functions can return cursors to the caller. This is useful to return multiple rows or columns, especially with very large result sets. To do this, the function opens the cursor and returns the cursor name to the caller (or simply opens the cursor using a portal name specified by or otherwise known to the caller). The caller can then fetch rows from the cursor. The cursor can be closed =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ by the caller, or it will be closed automatically when the transaction clos= es. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^= ^^^^^^^^^^^^ ----------------------------------- This is the behaviour i see in informix (i dunno for other major databases)... Cursors closes at end of transaction or by the user... -- Atentamente, Jaime Casanova (DBA: DataBase Aniquilator ;)
В списке pgsql-bugs по дате отправления: