ldap://ldap.mycompany.com/dc=mycompany,dc=com?uniqueMember?one?(cn=mydatabase)
</synopsis>
</para>
+
+ <para>
+ You can also mix regular service file entries with LDAP lookups.
+ A complete example for a stanza in <filename>pg_service.conf</filename>
+ would be:
+ <synopsis>
+ # only host and port are stored in LDAP, specify dbname and user explicitly
+ [customerdb]
+ dbname=customer
+ user=appuser
+ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*)
+ </synopsis>
+ <para>
</sect1>
<programlisting>
$ <userinput>psql "service=myservice sslmode=require"</userinput>
</programlisting>
+ This way you can also use LDAP for connection parameter lookup as
+ described in <xref linkend="libpq-ldap">.
See <xref linkend="libpq-connect"> for more information on all the
available connection options.
</para>
# A service is a set of named connection parameters. You may specify
# multiple services in this file. Each starts with a service name in
# brackets. Subsequent lines have connection configuration parameters of
-# the pattern "param=value". A sample configuration for postgres is
+# the pattern "param=value" or LDAP URLs starting with "ldap://"
+# to look up such parameters. A sample configuration for postgres is
# included in this file. Lines beginning with '#' are comments.
#
# Copy this to your sysconf directory (typically /usr/local/pgsql/etc) and