Home Explore Blog CI



postgresql

40th chunk of `doc/src/sgml/catalogs.sgml`
c1a645dd339002894de4e6edba002297f01e1142fd6915030000000100000fa6
 role="catalog_table_entry"><para role="column_definition">
       <structfield>setconfig</structfield> <type>text[]</type>
      </para>
      <para>
       Defaults for run-time configuration variables
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>
 </sect1>


 <sect1 id="catalog-pg-default-acl">
  <title><structname>pg_default_acl</structname></title>

  <indexterm zone="catalog-pg-default-acl">
   <primary>pg_default_acl</primary>
  </indexterm>

  <para>
   The catalog <structname>pg_default_acl</structname> stores initial
   privileges to be assigned to newly created objects.
  </para>

  <table>
   <title><structname>pg_default_acl</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>oid</structfield> <type>oid</type>
      </para>
      <para>
       Row identifier
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>defaclrole</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       The OID of the role associated with this entry
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>defaclnamespace</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-namespace"><structname>pg_namespace</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       The OID of the namespace associated with this entry,
       or zero if none
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>defaclobjtype</structfield> <type>char</type>
      </para>
      <para>
       Type of object this entry is for:
       <literal>r</literal> = relation (table, view),
       <literal>S</literal> = sequence,
       <literal>f</literal> = function,
       <literal>T</literal> = type,
       <literal>n</literal> = schema,
       <literal>L</literal> = large object
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>defaclacl</structfield> <type>aclitem[]</type>
      </para>
      <para>
       Access privileges that this type of object should have on creation
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>

  <para>
   A <structname>pg_default_acl</structname> entry shows the initial privileges to
   be assigned to an object belonging to the indicated user.  There are
   currently two types of entry: <quote>global</quote> entries with
   <structfield>defaclnamespace</structfield> = zero, and <quote>per-schema</quote> entries
   that reference a particular schema.  If a global entry is present then
   it <emphasis>overrides</emphasis> the normal hard-wired default privileges
   for the object type.  A per-schema entry, if present, represents privileges
   to be <emphasis>added to</emphasis> the global or hard-wired default privileges.
  </para>

  <para>
   Note that when an <acronym>ACL</acronym> entry in another catalog is null,
   it is taken to represent the hard-wired default privileges for its object,
   <emphasis>not</emphasis> whatever might be in <structname>pg_default_acl</structname>
   at the moment.  <structname>pg_default_acl</structname> is only consulted during
   object creation.
  </para>

 </sect1>


 <sect1 id="catalog-pg-depend">
  <title><structname>pg_depend</structname></title>

  <indexterm zone="catalog-pg-depend">
   <primary>pg_depend</primary>
  </indexterm>

Title: pg_default_acl Catalog and Introduction to pg_depend
Summary
The description details the columns of the pg_default_acl catalog, including oid (row identifier), defaclrole (role OID), defaclnamespace (namespace OID), defaclobjtype (object type), and defaclacl (access privileges). It explains the concept of global and per-schema entries and their effect on object privileges. It emphasizes that pg_default_acl is consulted only during object creation and doesn't affect existing ACLs. The description then transitions into introducing the pg_depend catalog.