ALTER TABLE .. ADD PRIMARY KEY .. USING INDEX has dump-restore hazard

Поиск
Список
Период
Сортировка
От Robert Haas
Тема ALTER TABLE .. ADD PRIMARY KEY .. USING INDEX has dump-restore hazard
Дата
Msg-id CA+TgmoYMsEPePx6J2oQHRqRmZuSQevFBbabyji6To1NK3TUs1Q@mail.gmail.com
обсуждение исходный текст
Ответы Re: ALTER TABLE .. ADD PRIMARY KEY .. USING INDEX has dump-restore hazard  (Michael Paquier <michael.paquier@gmail.com>)
Re: ALTER TABLE .. ADD PRIMARY KEY .. USING INDEX has dump-restore hazard  (Gurjeet Singh <gurjeet@singh.im>)
Список pgsql-hackers
Consider:

rhaas=# create table foo (a text);
CREATE TABLE
rhaas=# create unique index on foo (a collate "C");
CREATE INDEX
rhaas=# alter table foo add primary key using index foo_a_idx;
ALTER TABLE
rhaas=# \d foo   Table "public.foo"Column | Type | Modifiers
--------+------+-----------a      | text | not null
Indexes:   "foo_a_idx" PRIMARY KEY, btree (a COLLATE "C")

Now dump and restore this database.  Then:

rhaas=# \d foo   Table "public.foo"Column | Type | Modifiers
--------+------+-----------a      | text | not null
Indexes:   "foo_a_idx" PRIMARY KEY, btree (a)

Notice that the collation specifier is gone.  Oops.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Fillfactor for GIN indexes
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: Selectivity estimation for intarray with @@