1CLOSE()                          SQL Commands                          CLOSE()
2
3
4

NAME

6       CLOSE - close a cursor
7
8

SYNOPSIS

10       CLOSE name
11
12

DESCRIPTION

14       CLOSE  frees  the  resources associated with an open cursor.  After the
15       cursor is closed, no subsequent operations are allowed on it. A  cursor
16       should be closed when it is no longer needed.
17
18       Every  non-holdable open cursor is implicitly closed when a transaction
19       is terminated by COMMIT or ROLLBACK. A holdable  cursor  is  implicitly
20       closed  if  the transaction that created it aborts via ROLLBACK. If the
21       creating transaction successfully commits, the holdable cursor  remains
22       open until an explicit CLOSE is executed, or the client disconnects.
23

PARAMETERS

25       name   The name of an open cursor to close.
26

NOTES

28       PostgreSQL does not have an explicit OPEN cursor statement; a cursor is
29       considered open when it  is  declared.  Use  the  DECLARE  [declare(7)]
30       statement to declare a cursor.
31
32       You  can  see  all  available cursors by querying the pg_cursors system
33       view.
34

EXAMPLES

36       Close the cursor liahona:
37
38       CLOSE liahona;
39
40

COMPATIBILITY

42       CLOSE is fully conforming with the SQL standard.
43

SEE ALSO

45       DECLARE [declare(7)], FETCH [fetch(l)], MOVE [move(l)]
46
47
48
49SQL - Language Statements         2008-06-08                           CLOSE()
Impressum