pg_dump losing index column collations for unique and primary keys

From: Alexey Bashtanov <bashtanov(at)imap(dot)cc>
To: pgsql-bugs(at)postgresql(dot)org
Subject: pg_dump losing index column collations for unique and primary keys
Date: 2019-12-03 16:35:20
Message-ID: b05ce36a-cefb-ca5e-b386-a400535b1c0b@imap.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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

Attachment Content-Type Size
pg_dump_pk_collation_v001.patch text/x-patch 9.5 KB

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tomas Vondra 2019-12-03 16:38:18 Re: BUG #16145: Not able to terminate active session
Previous Message MOHAN KUMAR DORAIRAJ 2019-12-03 16:26:14 Re: BUG #16145: Not able to terminate active session