Re: steps to ensure referential integrity - Mailing list pgsql-admin

From scott.marlowe
Subject Re: steps to ensure referential integrity
Date
Msg-id Pine.LNX.4.33.0309231051240.12142-100000@css120.ihs.com
Whole thread Raw
In response to steps to ensure referential integrity  (Jodi Kanter <jkanter@virginia.edu>)
Responses Re: steps to ensure referential integrity  (aturner@neteconomist.com)
List pgsql-admin
On Mon, 22 Sep 2003, Jodi Kanter wrote:

> I have inherited a database that was originally created in postgres
> version 6.? There were no steps taken at that time to implement
> constraints to ensure referential integrity. There are no FK
> constraints, PK constraints, etc..
> Most of what currently exists is done in the existing code. I would like
> to change this and am interested in getting suggestions. I expect that
> PK constraints on each table as well as all FK constraints should be in
> place. Anything else that I should consider?
> I have indexes currently set up on a variety of fields, including PK
> fields. Do the constraints automatically generate indexes on these
> fields such that I should remove the ones created at the end of my script?
> Thanks in advance for the suggestions!

I would first upgrade to a reasonably new version of Postgesql 6.5.x is
pretty old.  7.3.4 or so should be a good choice.  You'll find that you
can add the pk/fk constraints in the conversion process, and still have a
faster database with fk/pk under 7.3 than you'd have with no fk/pk
constraints in 6.5.3


pgsql-admin by date:

Previous
From: "Nick Fankhauser"
Date:
Subject: PG version for n_distinct question.
Next
From: "scott.marlowe"
Date:
Subject: Re: postgres 6.2 vacuum