Name

CLOSE — close a cursor

Synopsis

CLOSE { name | ALL }

Notes

PostgreSQL™ does not have an explicit OPEN cursor statement; a cursor is considered open when it is declared. Use the DECLARE(7) statement to declare a cursor.

You can see all available cursors by querying the pg_cursors system view.

If a cursor is closed after a savepoint which is later rolled back, the CLOSE is not rolled back; that is, the cursor remains closed.