dropping column prevented due to inherited index - Mailing list pgsql-hackers

From Amit Langote
Subject dropping column prevented due to inherited index
Date
Msg-id CA+HiwqE9kuBsZ3b5pob2-cvE8ofzPWs-og+g8bKKGnu6b4-yTQ@mail.gmail.com
Whole thread Raw
Responses Re: dropping column prevented due to inherited index
List pgsql-hackers
Hi,

Maybe I'm forgetting some dependency management discussion that I was
part of recently, but is the following behavior unintentional?

create table p (a int, b int, c int) partition by list (a);
create table p1 partition of p for values in (1) partition by list (b);
create table p11 partition of p1 for values in (1);
create index on p (c);
alter table p drop column c;
ERROR:  cannot drop index p11_c_idx because index p1_c_idx requires it
HINT:  You can drop index p1_c_idx instead.

Dropping c should've automatically dropped the index p_c_idx and its
children and grandchildren, so the above complaint seems redundant.

Thanks,
Amit



pgsql-hackers by date:

Previous
From: Kuntal Ghosh
Date:
Subject: Re: [Patch] Invalid permission check in pg_stats for functional indexes
Next
From: Kuntal Ghosh
Date:
Subject: Re: [PATCH] psql: add tab completion for \df slash command suffixes