バージョンごとのドキュメント一覧

54.6. pg_cursors #

The <structname>pg_cursors</structname> view lists the cursors that are currently available. Cursors can be defined in several ways: pg_cursorsビューは現在利用可能なカーソルを列挙します。 以下のようにカーソルは複数の方法で定義可能です。

The <structname>pg_cursors</structname> view displays cursors created by any of these means. Cursors only exist for the duration of the transaction that defines them, unless they have been declared <literal>WITH HOLD</literal>. Therefore non-holdable cursors are only present in the view until the end of their creating transaction. pg_cursorsビューは、上のいずれかの方法で作成されたカーソルを表示します。 カーソルは、WITH HOLDと宣言されていない限り、それを定義したトランザクション期間しか存在しません。 したがって、保持不可能なカーソルは、作成元トランザクションが終わるまでの間のみ、このビューに現れます。

注記

Cursors are used internally to implement some of the components of <productname>PostgreSQL</productname>, such as procedural languages. Therefore, the <structname>pg_cursors</structname> view might include cursors that have not been explicitly created by the user. 手続き言語など、一部のPostgreSQLの要素を実装するために内部的にカーソルが使用されています。 したがって、pg_cursorsにはユーザが明示的に作成していないカーソルも含まれる可能性があります。

表54.6 pg_cursorsの列

<title><structname>pg_cursors</structname> Columns</title>

Column Type 列 型

Description 説明

name text

The name of the cursor カーソルの名前

statement text

The verbatim query string submitted to declare this cursor カーソル宣言の際に投稿された逐語的問い合わせ文字列

is_holdable bool

<literal>true</literal> if the cursor is holdable (that is, it can be accessed after the transaction that declared the cursor has committed); <literal>false</literal> otherwise trueの場合は、保持可能カーソル(つまりカーソルを宣言したトランザクションがコミットされた後でもアクセス可能なカーソル)。 それ以外はfalse

is_binary bool

<literal>true</literal> if the cursor was declared <literal>BINARY</literal>; <literal>false</literal> otherwise trueの場合は、カーソルがBINARYで宣言されている。 それ以外はfalse

is_scrollable bool

<literal>true</literal> if the cursor is scrollable (that is, it allows rows to be retrieved in a nonsequential manner); <literal>false</literal> otherwise trueの場合は、カーソルがスクロール可能(順序通り以外の方法に行を取り出すことが可能)。 それ以外はfalse

creation_time timestamptz

The time at which the cursor was declared カーソルが宣言された時間。


The <structname>pg_cursors</structname> view is read-only. pg_cursorsビューは読み取り専用です。