Home Explore Blog CI



postgresql

8th chunk of `doc/src/sgml/system-views.sgml`
a227fe5d2568aebb69be8165a77ce4ab7445f670e7dbe94f0000000100000fac
 <type>bool</type>
      </para>
      <para>
       True if the extension can be installed by non-superusers
       with appropriate privileges
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>relocatable</structfield> <type>bool</type>
      </para>
      <para>
       True if extension can be relocated to another schema
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>schema</structfield> <type>name</type>
      </para>
      <para>
       Name of the schema that the extension must be installed into,
       or <literal>NULL</literal> if partially or fully relocatable
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>requires</structfield> <type>name[]</type>
      </para>
      <para>
       Names of prerequisite extensions,
       or <literal>NULL</literal> if none
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>comment</structfield> <type>text</type>
      </para>
      <para>
       Comment string from the extension's control file
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>

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

 <sect1 id="view-pg-backend-memory-contexts">
  <title><structname>pg_backend_memory_contexts</structname></title>

  <indexterm zone="view-pg-backend-memory-contexts">
   <primary>pg_backend_memory_contexts</primary>
  </indexterm>

  <para>
   The view <structname>pg_backend_memory_contexts</structname> displays all
   the memory contexts of the server process attached to the current session.
  </para>
  <para>
   <structname>pg_backend_memory_contexts</structname> contains one row
   for each memory context.
  </para>

  <table>
   <title><structname>pg_backend_memory_contexts</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>
       Name of the memory context
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>ident</structfield> <type>text</type>
      </para>
      <para>
       Identification information of the memory context. This field is truncated at 1024 bytes
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>type</structfield> <type>text</type>
      </para>
      <para>
       Type of the memory context
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>level</structfield> <type>int4</type>
      </para>
      <para>
       The 1-based level of the context in the memory context hierarchy. The
       level of a context also shows the position of that context in the
       <structfield>path</structfield> column.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>path</structfield> <type>int4[]</type>
      </para>
      <para>
       Array of transient numerical identifiers to describe the memory
       context hierarchy. The first element is for
       <literal>TopMemoryContext</literal>, subsequent elements contain
       intermediate parents and the final element contains the identifier for
       the current context.
      </para></entry>

Title: System Views for Memory Contexts and Extensions
Summary
The section describes two system views in PostgreSQL: pg_available_extension_versions and pg_backend_memory_contexts. The pg_available_extension_versions view lists the available versions of extensions, including their installation status and requirements. The pg_backend_memory_contexts view displays the memory contexts of the server process attached to the current session, including their names, types, levels, and hierarchy. These views provide information for managing extensions and monitoring memory usage in PostgreSQL.