> At 16:33 22/11/00 +0800, Christopher Kings-Lynne wrote:
> >At 15:50 22/11/00 +0800, Christopher Kings-Lynne wrote:
> >> >I've been examining the pg_dump source and output, and I've come to the
> >> >conclusion that I can modify it so that UNIQUE constraints
> >> appear as part of
> >> >the CREATE TABLE statement, rather than as a separate CREATE INDEX.
> >> ...
> >> >Is there any problem with me working on this?
> >>
> >> I actually don't think it's a good idea to force things to work that way.
> >
> >Why, exactly?
> 
> Having now looked at the code and seen that PK constraints are already
> dumped in the table definition, I guess doing unique constraints in the
> same way is no worse.

I have a good reason not to use UNIQUE.  As I remember, pg_dump creates
the tables, copies in the data, then creates the indexes.  This is much
faster than doing the copy with the indexes already created.

-- 
  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

Reply via email to