Implementing SCD Type 2. - Mailing list pgsql-novice

From Henrik Aagaard Sørensen
Subject Implementing SCD Type 2.
Date
Msg-id CAGH8SeZwopCE9nopUUut2W-X=CKE=pNuqfwvrr-MVYiYrsKRdA@mail.gmail.com
Whole thread Raw
Responses Re: Implementing SCD Type 2.  (Kevin Grittner <kgrittn@ymail.com>)
List pgsql-novice
I'm new to PostgreSQL and this is my first post to this mailing-list.
Hopefully it's ok.

I've searched through the archives (and Google), without any result.

I'm looking into implementing SCD Type 2 in PostgreSQL:
with the approach of having valid_from and valid_to fields in a table.

Can anyone help me out with constraints, checks etc. for such a solution?

My table should contain the following columns:
user_id
email_address
valid_from
valid_to

where an user can change e-mail address.

I'm implementing updates etc. via a API, however, I would like to have the table secured for invalid data, overlap etc.

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Cannot create perlplu function
Next
From: Bastiaan Olij
Date:
Subject: Re: about .pgpass