postgresql_16:7.1.48.3 Notes
PostgreSQL 16 > Reference > SQL Commands > CLOSE > Notes
PostgreSQL does not have an explicit OPEN cursor statement; a cursor is considered open when it is declared. Use the DECLARE (see postgresql_16:7.1.97) statement to declare a cursor.
You can see all available cursors by querying the pg_cursors (see postgresql_16:8.3.6) 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.