Home Explore Blog CI



postgresql

11th chunk of `doc/src/sgml/extend.sgml`
b83e742001313165bb3b0d43a2baa6362c80ba7f334560140000000100000fa4
 creating an extension, but not during extension updates
        (since that might override user-added comments).  Alternatively,
        the extension's comment can be set by writing
        a <xref linkend="sql-comment"/> command in the script file.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="extend-extensions-files-encoding">
      <term><varname>encoding</varname> (<type>string</type>)</term>
      <listitem>
       <para>
        The character set encoding used by the script file(s).  This should
        be specified if the script files contain any non-ASCII characters.
        Otherwise the files will be assumed to be in the database encoding.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="extend-extensions-files-module-pathname">
      <term><varname>module_pathname</varname> (<type>string</type>)</term>
      <listitem>
       <para>
        The value of this parameter will be substituted for each occurrence
        of <literal>MODULE_PATHNAME</literal> in the script file(s).  If it is not
        set, no substitution is made.  Typically, this is set to just
        <literal><replaceable>shared_library_name</replaceable></literal> and
        then <literal>MODULE_PATHNAME</literal> is used in <command>CREATE
        FUNCTION</command> commands for C-language functions, so that the script
        files do not need to hard-wire the name of the shared library.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="extend-extensions-files-requires">
      <term><varname>requires</varname> (<type>string</type>)</term>
      <listitem>
       <para>
        A list of names of extensions that this extension depends on,
        for example <literal>requires = 'foo, bar'</literal>.  Those
        extensions must be installed before this one can be installed.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="extend-extensions-files-no-relocate">
      <term><varname>no_relocate</varname> (<type>string</type>)</term>
      <listitem>
       <para>
        A list of names of extensions that this extension depends on that
        should be barred from changing their schemas via <command>ALTER
        EXTENSION ... SET SCHEMA</command>.
        This is needed if this extension's script references the name
        of a required extension's schema (using
        the <literal>@extschema:<replaceable>name</replaceable>@</literal>
        syntax) in a way that cannot track renames.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="extend-extensions-files-superuser">
      <term><varname>superuser</varname> (<type>boolean</type>)</term>
      <listitem>
       <para>
        If this parameter is <literal>true</literal> (which is the default),
        only superusers can create the extension or update it to a new
        version (but see also <varname>trusted</varname>, below).
        If it is set to <literal>false</literal>, just the privileges
        required to execute the commands in the installation or update script
        are required.
        This should normally be set to <literal>true</literal> if any of the
        script commands require superuser privileges.  (Such commands would
        fail anyway, but it's more user-friendly to give the error up front.)
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="extend-extensions-files-trusted">
      <term><varname>trusted</varname> (<type>boolean</type>)</term>
      <listitem>
       <para>
        This parameter, if set to <literal>true</literal> (which is not the
        default), allows some non-superusers to install an extension that
        has <varname>superuser</varname> set to <literal>true</literal>.
        Specifically, installation will be permitted for anyone who has
        <literal>CREATE</literal> privilege on the current database.
        When the user executing <command>CREATE EXTENSION</command>

Title: PostgreSQL Extension Control File Parameters
Summary
This section details additional parameters that can be set in a PostgreSQL extension control file. It covers 'module_pathname' for substituting shared library names in script files, 'requires' for specifying dependencies on other extensions, 'no_relocate' for preventing schema changes in required extensions, 'superuser' for controlling who can create or update the extension, and 'trusted' for allowing non-superusers to install superuser extensions under certain conditions. Each parameter is explained with its purpose, usage, and implications for extension installation and management. The text emphasizes the importance of these settings for controlling extension behavior, dependencies, and security.