[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: backsql_create.sql file for PostgreSQL for rdbms_depend/postgresql (ITS#967)

This is a multi-part message in MIME format.
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Oops ... I thought I have attached the file. Hmm ... here it comes.

Dmitry Kovalev wrote:

> Hello, Heiko!
> h.nardmann@secunet.de wrote:
> > I have created a new file for the servers/slapd/back-sql/ directory.
> > Since PostgreSQL is not supported there a new directory postgresql has
> > to
> > be created there.
> > Then the file can inserted in this directory.
> >
> Didn't quite catch you... Did you mean that you are willing to contribute
> postgresql support for back-sql? What directory do you need?


> Generally, you can just post all files needed as attachment, or upload it
> to OpenLDAP's FTP and provide a link (see contributing guidelines). Then
> someone (most probably me in case of back-sql ;) could revise your
> suggestions and commit them with appropriate notice.

As my PostgreSQL setup did not like any of the backsql_create.sql files
provided with 2.0.7 I thought to change the file to fit to PostgreSQL.
No more, no less.

Probably I am going to check the other SQL files, too, and post my results.

There is no postgresql directory in servers/slapd/back-sql/rdbms_depend.

Probably you have more and/or better contributions from other sites already?

> As for postgres support - as you could see browsing ITS and maillists,
> there were at least two similar contributions, but either had some patches
> incompatible with other RDBMSes, which should be resolved in some generally
> compatible way. So, they are not directly applicable, and need some work
> before committing, for which I have no time right now.
> You can kindly post your solution though, so that I can examine it along
> with previous and figure out the compatible way to add postgresql support.
> WBW, Dmitry

Heiko Nardmann (Dipl.-Ing.), h.nardmann@secunet.de, Software Development
secunet Security Networks AG - Sicherheit in Netzwerken (www.secunet.de),
Weidenauer Str. 223-225, D-57076 Siegen
Tel. : +49 271 48950-13, Fax  : +49 271 48950-50

Content-Type: text/plain; charset=us-ascii;
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;

create sequence ldap_objclass_ids start 1 increment 1;

create sequence ldap_attr_ids start 1 increment 1;

create sequence ldap_entry_ids start 1 increment 1;

create table ldap_oc_mappings (
	id integer primary key default nextval('ldap_objclass_ids'),
	name varchar(64) unique not null ,
	keytbl varchar(64) not null ,
	keycol varchar(64) not null ,
	create_proc varchar(255),
	delete_proc varchar(255),
	expect_return integer not null

create table ldap_attr_mappings (
	id integer primary key default nextval('ldap_attr_ids'),
	oc_map_id integer not null references ldap_oc_mappings(id),
	name varchar(255) not null,
	sel_expr varchar(255) not null,
	from_tbls varchar(255) not null,
	join_where varchar(255),
	add_proc varchar(255),
	delete_proc varchar(255),
	param_order integer not null,
	expect_return integer not null

create table ldap_entries (
	id integer primary key default nextval('ldap_entry_ids'),
	dn varchar(255) unique not null ,
	oc_map_id integer not null references ldap_oc_mappings(id),
	parent integer not null ,
	keyval integer not null ,

create table ldap_referrals
	entry_id integer not null references ldap_entries(id),
	url varchar(1023) not null

create table ldap_entry_objclasses
	entry_id integer not null references ldap_entries(id),
	oc_name varchar(64)