Home Explore Blog CI



postgresql

20th chunk of `doc/src/sgml/libpq.sgml`
e64ea0e2d9c39a8f869df2d906f8b1d3199b6e1d5ac4d6ed0000000100000fa0
    <listitem>
           <para>
            The server must request Windows <acronym>SSPI</acronym>
            authentication.
           </para>
          </listitem>
         </varlistentry>

         <varlistentry>
          <term><literal>scram-sha-256</literal></term>
          <listitem>
           <para>
            The server must successfully complete a SCRAM-SHA-256 authentication
            exchange with the client.
           </para>
          </listitem>
         </varlistentry>

         <varlistentry>
          <term><literal>oauth</literal></term>
          <listitem>
           <para>
            The server must request an OAuth bearer token from the client.
           </para>
          </listitem>
         </varlistentry>

         <varlistentry>
          <term><literal>none</literal></term>
          <listitem>
           <para>
            The server must not prompt the client for an authentication
            exchange. (This does not prohibit client certificate authentication
            via TLS, nor GSS authentication via its encrypted transport.)
           </para>
          </listitem>
         </varlistentry>
        </variablelist>
      </para>
      </listitem>
     </varlistentry>

     <varlistentry id="libpq-connect-channel-binding" xreflabel="channel_binding">
      <term><literal>channel_binding</literal></term>
      <listitem>
      <para>
        This option controls the client's use of channel binding. A setting
        of <literal>require</literal> means that the connection must employ
        channel binding, <literal>prefer</literal> means that the client will
        choose channel binding if available, and <literal>disable</literal>
        prevents the use of channel binding. The default
        is <literal>prefer</literal> if
        <productname>PostgreSQL</productname> is compiled with SSL support;
        otherwise the default is <literal>disable</literal>.
      </para>
      <para>
        Channel binding is a method for the server to authenticate itself to
        the client. It is only supported over SSL connections
        with <productname>PostgreSQL</productname> 11 or later servers using
        the <literal>SCRAM</literal> authentication method.
      </para>
      </listitem>
     </varlistentry>

     <varlistentry id="libpq-connect-connect-timeout" xreflabel="connect_timeout">
      <term><literal>connect_timeout</literal></term>
      <listitem>
      <para>
       Maximum time to wait while connecting, in seconds (write as a decimal integer,
       e.g., <literal>10</literal>).  Zero, negative, or not specified means
       wait indefinitely.
       This timeout applies separately to each host name or IP address.
       For example, if you specify two hosts and <literal>connect_timeout</literal>
       is 5, each host will time out if no connection is made within 5
       seconds, so the total time spent waiting for a connection might be
       up to 10 seconds.
      </para>
      </listitem>
     </varlistentry>

     <varlistentry id="libpq-connect-client-encoding" xreflabel="client_encoding">
      <term><literal>client_encoding</literal></term>
      <listitem>
      <para>
       This sets the <varname>client_encoding</varname>
       configuration parameter for this connection.  In addition to
       the values accepted by the corresponding server option, you
       can use <literal>auto</literal> to determine the right
       encoding from the current locale in the client
       (<envar>LC_CTYPE</envar> environment variable on Unix
       systems).
      </para>
      </listitem>
     </varlistentry>

     <varlistentry id="libpq-connect-options" xreflabel="options">
      <term><literal>options</literal></term>
      <listitem>
       <para>
        Specifies command-line options to send to the server at connection
        start.  For example, setting this to <literal>-c geqo=off</literal>
        or <literal>--geqo=off</literal> sets the session's value

Title: Connection Parameters: Channel Binding, Connect Timeout, Client Encoding, and Options
Summary
This section describes several additional libpq connection parameters. It explains the 'channel_binding' parameter, which controls the client's use of channel binding (require, prefer, disable) for server authentication over SSL with SCRAM. It also details 'connect_timeout', specifying the maximum wait time in seconds for establishing a connection. Additionally, it explains 'client_encoding', which sets the client encoding, including the 'auto' option to determine encoding from the client's locale. Finally, it covers 'options', which allows sending command-line options to the server at connection startup.