Re: Dump/Restore of non-default PKs

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Dump/Restore of non-default PKs
Дата
Msg-id 2379840.1650314887@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Dump/Restore of non-default PKs  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: Dump/Restore of non-default PKs  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: Dump/Restore of non-default PKs  (Simon Riggs <simon.riggs@enterprisedb.com>)
Re: Dump/Restore of non-default PKs  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Список pgsql-hackers
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Mon, Apr 18, 2022 at 1:00 PM Simon Riggs <simon.riggs@enterprisedb.com>
> wrote:
>> I propose that we change pg_dump so that when it creates a PK it does
>> so in 2 commands:
>> 1. CREATE [UNIQUE] INDEX iname ...
>> 2. ALTER TABLE .. ADD PRIMARY KEY USING INDEX iname;

> Why not just get rid of the limitation that constraint definitions don't
> support non-default methods?

That approach would be doubling down on the assumption that we can always
shoehorn more custom options into SQL-standard constraint clauses, and
we'll never fall foul of shift/reduce problems or future spec additions.
I think for example that USING INDEX TABLESPACE is a blot on humanity,
and I'd be very glad to see pg_dump stop using it in favor of doing
things as Simon suggests.

            regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: using an end-of-recovery record in all cases
Следующее
От: Greg Stark
Дата:
Сообщение: Re: avoid multiple hard links to same WAL file after a crash