Unique and Primary Key Constraints

From: Rod Taylor <rbt(at)zort(dot)ca>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Unique and Primary Key Constraints
Date: 2002-07-13 03:11:38
Message-ID: 1026529900.30427.81.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I'm going to change the pg_dump command to pull these constraints out of
pg_constaint where possible, creating the appropriate alter table add
constraint command (see primary key).

Should unique constraints created with 'create index' (no entry in
pg_constraint) be re-created via alter table add constraint, or via
create unique index?

I prefer ...add constraint. After a while (release or 2) removal of
create unique index all together.

Since index names are unique, and all unique and primary key constraints
have a matching name in pg_index there isn't a problem with name
conflicts.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Kings-Lynne 2002-07-13 03:18:14 Re: test data for query optimizer
Previous Message Rod Taylor 2002-07-13 02:51:54 Re: Memo on dropping practices