Re: pg_dump / Unique constraints

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: pg_dump / Unique constraints
Дата
Msg-id 200011221550.KAA18441@candle.pha.pa.us
обсуждение исходный текст
Ответ на RE: pg_dump / Unique constraints  (Philip Warner <pjw@rhyme.com.au>)
Ответы Re: pg_dump / Unique constraints  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> 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 pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Thomas Lockhart
Дата:
Сообщение: Re: Crash during WAL recovery?
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: Crash during WAL recovery?