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.