Re: Postgres unique index checking and atomic transactions

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Postgres unique index checking and atomic transactions
Дата
Msg-id 87el0fq1cb.fsf@stark.dyndns.tv
обсуждение исходный текст
Ответ на Re: Postgres unique index checking and atomic transactions  (Dmitry Tkach <dmitry@openratings.com>)
Ответы Re: Postgres unique index checking and atomic transactions  (Dmitry Tkach <dmitry@openratings.com>)
Re: Postgres unique index checking and atomic transactions  (Dennis Gearon <gearond@cvc.net>)
Re: Postgres unique index checking and atomic transactions  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Список pgsql-general
Dmitry Tkach <dmitry@openratings.com> writes:

> The good news though is that, if you drop (or disable) your pk index

That's what I did, except I had to cascade to the foreign keys and then
recreate them too. And you can't really recreate a primary key constraint, you
just get a unique index which I think is equivalent.

And that's another wishlist item. It would be nice to be able to disable
constraints without dropping them and without poking around in catalog tables
manually.

Ie, it would be nice to be able to do

 alter table foo disable constraint "$1"

and then later do

 alter table foo enable constraint "$1"

and have postgres optionally recheck the constraint or not. It would be a lot
safer than potentially accidentally recreating the constraint incorrectly. And
a lot safer than poking around in the catalog tables.

--
greg

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

Предыдущее
От: Dmitry Tkach
Дата:
Сообщение: Re: Postgres unique index checking and atomic transactions
Следующее
От: "Vernon Smith"
Дата:
Сообщение: Re: SAP DB: The unsung Open Source DB