BUG #15587: Partitions with ALTER TABLE ADD CONSTRAINT

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #15587: Partitions with ALTER TABLE ADD CONSTRAINT
Дата
Msg-id 15587-562060223190c97a@postgresql.org
обсуждение исходный текст
Ответы Re: BUG #15587: Partitions with ALTER TABLE ADD CONSTRAINT  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      15587
Logged by:          Jesper Pedersen
Email address:      jesper.pedersen@redhat.com
PostgreSQL version: 11.1
Operating system:   Fedora 28
Description:

Hi,

The following works

CREATE TABLE t1 (i1 INT NOT NULL, i2 INT NOT NULL) PARTITION BY HASH (i1);

\o /dev/null
SELECT 'CREATE TABLE t1_p' || x::text || ' PARTITION OF t1
FOR VALUES WITH (MODULUS 64, REMAINDER ' || x::text || ');'
from generate_series(0,63) x;
\gexec
\o

ALTER TABLE ONLY t1 ADD CONSTRAINT uniq_t1_i1_i2 UNIQUE (i1, i2);

which gives

test=# \d+ t1
                              Partitioned table "public.t1"
 Column |  Type   | Collation | Nullable | Default | Storage | Stats target
| Description 
--------+---------+-----------+----------+---------+---------+--------------+-------------
 i1     | integer |           | not null |         | plain   |
| 
 i2     | integer |           | not null |         | plain   |
| 
Partition key: HASH (i1)
Indexes:
    "uniq_t1_i1_i2" UNIQUE CONSTRAINT, btree (i1, i2) INVALID


Removing ONLY from the ALTER command makes the index correct.

All branches.

Best regards,
 Jesper


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

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: Is temporary functions feature official/supported? Found someissues with it.
Следующее
От: Hugh Ranalli
Дата:
Сообщение: Re: BUG #15548: Unaccent does not remove combining diacritical characters