Home Explore Blog CI



postgresql

11th chunk of `doc/src/sgml/system-views.sgml`
3a5a0a4c29d7f80a94910f5b546cc65acc72dfbb83a342cf0000000100000fa7
 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.

   <note>
    <para>
     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.
    </para>
   </note>
  </para>

  <table>
   <title><structname>pg_cursors</structname> Columns</title>
   <tgroup cols="1">
    <thead>
     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       Column Type
      </para>
      <para>
       Description
      </para></entry>
     </row>
    </thead>

    <tbody>
     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>name</structfield> <type>text</type>
      </para>
      <para>
       The name of the cursor
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>statement</structfield> <type>text</type>
      </para>
      <para>
       The verbatim query string submitted to declare this cursor
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>is_holdable</structfield> <type>bool</type>
      </para>
      <para>
       <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
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>is_binary</structfield> <type>bool</type>
      </para>
      <para>
       <literal>true</literal> if the cursor was declared
       <literal>BINARY</literal>; <literal>false</literal>
       otherwise
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>is_scrollable</structfield> <type>bool</type>
      </para>
      <para>
       <literal>true</literal> if the cursor is scrollable (that is, it
       allows rows to be retrieved in a nonsequential manner);
       <literal>false</literal> otherwise
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>creation_time</structfield> <type>timestamptz</type>
      </para>
      <para>
       The time at which the cursor was declared
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>

  <para>
   The <structname>pg_cursors</structname> view is read-only.
  </para>

 </sect1>

 <sect1 id="view-pg-file-settings">
  <title><structname>pg_file_settings</structname></title>

  <indexterm zone="view-pg-file-settings">
   <primary>pg_file_settings</primary>
  </indexterm>

  <para>
   The view <structname>pg_file_settings</structname> provides a summary of
   the contents of the server's configuration file(s).  A row appears in
   this view for each <quote>name = value</quote> entry appearing in the files,
   with annotations indicating whether the value could be applied
   successfully.  Additional row(s) may appear for problems not linked to
   a <quote>name = value</quote> entry, such as syntax errors in the files.
  </para>

  <para>
   This view is helpful for checking whether planned changes in the
   configuration files will work, or for diagnosing a previous failure.
   Note that this view reports on the <emphasis>current</emphasis> contents of the
   files, not on what was last applied by the server.  (The
   <link linkend="view-pg-settings"><structname>pg_settings</structname></link>
   view is usually

Title: PostgreSQL System Views: pg_cursors and pg_file_settings
Summary
This section describes two PostgreSQL system views: pg_cursors and pg_file_settings. The pg_cursors view lists the cursors that are currently available, including their name, statement, and properties such as holdability, binary, and scrollability. The view also includes the time at which the cursor was declared and is read-only. The pg_file_settings view provides a summary of the server's configuration file(s), showing the name and value of each entry, along with any errors or issues that may have occurred while applying the configuration.