Re: Primary key vs unique index

Поиск
Список
Период
Сортировка
От Gurjeet Singh
Тема Re: Primary key vs unique index
Дата
Msg-id CABwTF4Ub43O5JzsgqDL_RpLz1A+28b4Nn7EWMwv8Vmea=+yJnw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Primary key vs unique index  (rverghese <riyav@hotmail.com>)
Список pgsql-general
On Fri, Jul 6, 2012 at 2:07 PM, rverghese <riyav@hotmail.com> wrote:
Yes I am using that option for one of my POstgres 9.1 database and it works
well. But its still an issue with Foreign keys, which you need to drop and
recreate .

Having to drop and create foriegn keys is a legitimate concern. I am looking into improving that.
 
Also I use Slony for replication and it uses the primary key to
check repl. So I don't want that to be interrupted by dropping PK and
recreating PK.

If you look closely at that example, DROP and CREATE of the primary key is being done in one command (and hence one transaction), so anything that depends  this constraint should not be affected except from the fact that this table will be locked in exclusive mode for the duration of this operation, which should be very short.

Best regards,
--
Gurjeet Singh
EnterpriseDB Corporation
The Enterprise PostgreSQL Company

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

Предыдущее
От: Don Parris
Дата:
Сообщение: Tutorial On Connecting LibreOffice to PostgreSQL Available
Следующее
От: Andy Chambers
Дата:
Сообщение: Weird "LIKE" behaviour