CLOSE
Closes acursor.
概要
CLOSE cursor name
描述
CLOSE释放和一个游标关联的资源。游标关闭后,没有后续操作是允许就可以了。当不再需要它的游标应该关闭。
当一个事务由COMMIT或ROLLBACK终止每个不可保持打开游标被隐式关闭。如果创建事务通过它中止ROLLBACK一个保持游标被隐式关闭。如果创建事务成功提交,直到执行一个明确的CLOSE的保持的游标保持打开,或者客户端断开。
parameter
cursor_name Thename of an open cursor to close.
Notes
Greenplum Database does not have anexplicit open cursorstatement. A cursor is considered open when it is declared. Use the declare statement to declare (and open) acursor.
You can seeall available cursors by querying the pg_cursors system view.
示例
Close thecursor portaia:Q
CLOSE portala;
兼容性
close is fully conforming with the SQLstandard.
相关参考
DECLARE,FETCH, MOVE