dblink_close <refpurpose>closes a cursor in a remote database</refpurpose> — リモートデータベースでカーソルを閉じる
dblink_close(text cursorname [, bool fail_on_error]) returns text dblink_close(text connname, text cursorname [, bool fail_on_error]) returns text
<function>dblink_close</function> closes a cursor previously opened with
<function>dblink_open</function>.
dblink_closeは前もってdblink_openで開かれたカーソルを閉ざします。
connnameName of the connection to use; omit this parameter to use the unnamed connection. 使用する接続の名前です。 無名の接続を使用する場合はこのパラメータを省略します。
cursornameThe name of the cursor to close. 閉じるカーソルの名前です。
fail_on_error
If true (the default when omitted) then an error thrown on the
remote side of the connection causes an error to also be thrown
locally. If false, the remote error is locally reported as a NOTICE,
and the function's return value is set to <literal>ERROR</literal>.
真(省略時のデフォルト)の場合、接続のリモート側で発生したエラーによりローカル側でもエラーが発生します。
偽の場合リモート側のエラーはローカル側にはNOTICEとして報告され、この関数の戻り値はERRORになります。
Returns status, either <literal>OK</literal> or <literal>ERROR</literal>.
状態、つまりOKまたはERRORを返します。
If <function>dblink_open</function> started an explicit transaction block,
and this is the last remaining open cursor in this connection,
<function>dblink_close</function> will issue the matching <command>COMMIT</command>.
dblink_openが明示的なトランザクションブロックを開始し、これが接続上で最後まで開き続けているカーソルであった場合、dblink_closeは対応するCOMMITを発行します。
SELECT dblink_connect('dbname=postgres options=-csearch_path=');
dblink_connect
----------------
OK
(1 row)
SELECT dblink_open('foo', 'select proname, prosrc from pg_proc');
dblink_open
-------------
OK
(1 row)
SELECT dblink_close('foo');
dblink_close
--------------
OK
(1 row)