Import LDAP data to a Postgres database

Started by Marco Curtoloover 18 years ago5 messagesgeneral
Jump to latest
#1Marco Curtolo
marcoecommerce@hotmail.it

Hi, my question is this: it is possible to query, using SQL, an LDAP server and put these data to a table of a Postgres database (under linux) ???
Thanks to all.

_________________________________________________________________
Scarica GRATIS 30 emoticon per Messenger!
http://www.emoticons-livemessenger.com/pages/msnit/index.htm

#2Andrej Ricnik-Bay
andrej.groups@gmail.com
In reply to: Marco Curtolo (#1)
Re: Import LDAP data to a Postgres database

On 12/6/07, Marco Curtolo <marcoecommerce@hotmail.it> wrote:

Hi, my question is this: it is possible to query, using SQL, an LDAP server
and put these data to a table of a Postgres database (under linux) ???

I don't know of any LDAP server implementations that can
be queried via SQL, and getting LDAP tree data into any
RDBMS can be done, but it won't be trivial once you get
to tree objects that have more than one value per attribute,
i.e. you'll have to map those attributes into separate tables.

Thanks to all.

Cheers,
Andrej

--
Please don't top post, and don't use HTML e-Mail :} Make your quotes concise.

http://www.american.edu/econ/notes/htmlmail.htm

#3Magnus Hagander
magnus@hagander.net
In reply to: Marco Curtolo (#1)
Re: Import LDAP data to a Postgres database

On Thu, Dec 06, 2007 at 09:42:19AM +0100, Marco Curtolo wrote:

Hi, my question is this: it is possible to query, using SQL, an LDAP server and put these data to a table of a Postgres database (under linux) ???

Depending on exactly what you nede to do, check out dblink-ldap
(http://pgfoundry.org/projects/dblink-ldap/)

//Magnus

#4Laurenz Albe
laurenz.albe@cybertec.at
In reply to: Marco Curtolo (#1)
Re: Import LDAP data to a Postgres database

Marco Curtolo write:

Hi, my question is this: it is possible to query, using SQL,
an LDAP server and put these data to a table of a Postgres
database (under linux) ???

Yes, by writing a function in C that uses the LDAP API.

Yours,
Laurenz Albe

#5Chris Browne
cbbrowne@acm.org
In reply to: Marco Curtolo (#1)
Re: Import LDAP data to a Postgres database

marcoecommerce@hotmail.it (Marco Curtolo) writes:

Hi, my question is this: it is possible to query, using SQL, an LDAP
server and put these data to a table of a Postgres database (under
linux) ???

Unfortunately, the LDAP model is more or less a "network model," which
doesn't fit terribly elegantly onto SQL.

You can in fact use PostgreSQL as the backend for OpenLDAP; there's a
HOWTO on this:

<http://www.samse.fr/GPL/ldap_pg/HOWTO/&gt;

There are also ways of exporting SQL data via LDAP; see here:

<http://www.openldap.org/faq/data/cache/378.html&gt;
--
select 'cbbrowne' || '@' || 'linuxdatabases.info';
http://www3.sympatico.ca/cbbrowne/sap.html
Microsoft Outlook: Deploying Viruses Has Never Been This Easy!