pg_dump losing index column collations for unique and primary keys
Alexey Bashtanov <bashtanov@imap.cc>
From: Alexey Bashtanov <bashtanov@imap.cc>
To: pgsql-bugs@postgresql.org
Date: 2019-12-03T16:35:20Z
Lists: pgsql-bugs
Attachments
- pg_dump_pk_collation_v001.patch (text/x-patch) patch v1
Hello, I found that pg_dump fails to note down the collations used primary and unique keys supporting indexes. To reproduce: create table f(a text); create unique index f_pkey on f(a collate "C.UTF-8"); alter table f add primary key using index f_pkey; \d f pg_dump -t f The only way to dump it correctly is to create indexes explicitly and then use them in constraint definitions. Please could someone have a look at the patch attached. Thank you. Best, Alex
Commits
-
Disallow non-default collation in ADD PRIMARY KEY/UNIQUE USING INDEX.
- fbbf68094c5f 13.0 landed