Rod Taylor wrote:
> 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? 

CREATE UNIQUE INDEX has optimization purpose as well as an constraint
purpose.  I think CREATE UNIQUE INDEX is the way to go.

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

Remove CREATE UNIQUE INDEX entirely?  Why?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [EMAIL PROTECTED]               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply via email to