Home Explore Blog CI



postgresql

25th chunk of `doc/src/sgml/system-views.sgml`
1abd7809504facfacbcad919960fb0da6e55bd523260c15e0000000100000fa1
 </para>
      <para>
       The command type to which the policy is applied
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>qual</structfield> <type>text</type>
      </para>
      <para>
       The expression added to the security barrier qualifications for
       queries that this policy applies to
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>with_check</structfield> <type>text</type>
      </para>
      <para>
       The expression added to the WITH CHECK qualifications for
       queries that attempt to add rows to this table
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>

 </sect1>

 <sect1 id="view-pg-prepared-statements">
  <title><structname>pg_prepared_statements</structname></title>

  <indexterm zone="view-pg-prepared-statements">
   <primary>pg_prepared_statements</primary>
  </indexterm>

  <para>
   The <structname>pg_prepared_statements</structname> view displays
   all the prepared statements that are available in the current
   session. See <xref linkend="sql-prepare"/> for more information about prepared
   statements.
  </para>

  <para>
   <structname>pg_prepared_statements</structname> contains one row
   for each prepared statement. Rows are added to the view when a new
   prepared statement is created and removed when a prepared statement
   is released (for example, via the <link linkend="sql-deallocate"><command>DEALLOCATE</command></link> command).
  </para>

  <table>
   <title><structname>pg_prepared_statements</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 identifier of the prepared statement
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>statement</structfield> <type>text</type>
      </para>
      <para>
       The query string submitted by the client to create this
       prepared statement. For prepared statements created via SQL,
       this is the <command>PREPARE</command> statement submitted by
       the client. For prepared statements created via the
       frontend/backend protocol, this is the text of the prepared
       statement itself.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>prepare_time</structfield> <type>timestamptz</type>
      </para>
      <para>
       The time at which the prepared statement was created
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>parameter_types</structfield> <type>regtype[]</type>
      </para>
      <para>
       The expected parameter types for the prepared statement in the
       form of an array of <type>regtype</type>. The OID corresponding
       to an element of this array can be obtained by casting the
       <type>regtype</type> value to <type>oid</type>.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>result_types</structfield> <type>regtype[]</type>
      </para>
      <para>
       The types of the columns returned by the prepared statement in the
       form of an array of <type>regtype</type>. The OID corresponding
       to an element of this array can be obtained by casting the
       <type>regtype</type> value to <type>oid</type>.
       If the prepared statement does not provide

Title: Database View: pg_prepared_statements
Summary
The pg_prepared_statements view displays all prepared statements available in the current session, with each row representing a prepared statement. The view contains columns such as name, statement, prepare_time, parameter_types, and result_types, which provide details about each prepared statement, including its identifier, query string, creation time, expected parameter types, and column return types.