Add LDAP URL documentation.
authorBruce Momjian
Fri, 14 Sep 2007 14:31:22 +0000 (14:31 +0000)
committerBruce Momjian
Fri, 14 Sep 2007 14:31:22 +0000 (14:31 +0000)
Albe Laurenz

doc/src/sgml/libpq.sgml
doc/src/sgml/ref/psql-ref.sgml
src/interfaces/libpq/pg_service.conf.sample

index 448a24d074c171beb51964b9be3240427f5f0731..1c033e308417b2c014d1e2e88808fc77a27fa8d0 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
 
  <application>libpq</application> - C Library
@@ -5085,6 +5085,19 @@ defaultNoticeProcessor(void *arg, const char *message)
     ldap://ldap.mycompany.com/dc=mycompany,dc=com?uniqueMember?one?(cn=mydatabase)
    
   
+
+  
+   You can also mix regular service file entries with LDAP lookups.
+   A complete example for a stanza in pg_service.conf
+   would be:
+   
+    # 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=*)
+   
+  
  
 
 
index c01f1f5cc8ae01ca343a8fea23e2eebabd37e784..bf63e162d209e0a0e395e88f5dc36f66b9c5ce84 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -567,6 +567,8 @@ PostgreSQL documentation
 
 $ psql "service=myservice sslmode=require"
 
+     This way you can also use LDAP for connection parameter lookup as
+     described in .
      See  for more information on all the
      available connection options.
     
index 8a22fda95a2ff9725537765cdba39ef7a874f968..de60028177c7cfb4d7ef45418dd1120f8adff409 100644 (file)
@@ -4,7 +4,8 @@
 # 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