OpenLDAP-PostgreSQL Linux HOWTO describes how to have a PostgreSQL database working as an SQL backend for OpenLDAP.