mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-22 07:39:35 -05:00
- now all write operations appear to work correctly with PostgeSQL 7.0
- all write operations have been made transactional (atomic writes to
entries are committed separately only in case of complete^1 success
while all other operations are rolled-back by default)
- more cleanup and handling of exceptional conditions
TODO:
- deen to check with different databases and more up to date versions
of both unixODBC and PostgreSQL.
^1: attribute add/modify/delete operations silently succeed if the
appropriate add/delete proc does not exist for each attribute;
this may be correct to hide undesired/unimplemented correspondence
between LDAP and SQL databases; however, a more appropriate
LDAP behavior would be a failure with LDAP_UNAVAILABLE if a
single write operation cannot be executed for such reason
38 lines
772 B
SQL
38 lines
772 B
SQL
drop table persons;
|
|
drop sequence persons_id_seq;
|
|
create table persons (
|
|
id serial not null primary key,
|
|
name varchar(255) not null,
|
|
surname varchar(255) not null
|
|
);
|
|
|
|
drop table institutes;
|
|
drop sequence institutes_id_seq;
|
|
create table institutes (
|
|
id serial not null primary key,
|
|
name varchar(255)
|
|
);
|
|
|
|
drop table documents;
|
|
drop sequence documents_id_seq;
|
|
create table documents (
|
|
id serial not null primary key,
|
|
title varchar(255) not null,
|
|
abstract varchar(255)
|
|
);
|
|
|
|
drop table authors_docs;
|
|
create table authors_docs (
|
|
pers_id int not null,
|
|
doc_id int not null,
|
|
primary key ( pers_id, doc_id )
|
|
);
|
|
|
|
drop table phones;
|
|
drop sequence phones_id_seq;
|
|
create table phones (
|
|
id serial not null primary key,
|
|
phone varchar(255) not null ,
|
|
pers_id int not null
|
|
);
|
|
|