Re: [HACKERS] map_partition_varattnos() and whole-row vars - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [HACKERS] map_partition_varattnos() and whole-row vars
Date
Msg-id CA+TgmoYRw0s38K4vH7Wwf-hLs9Cdb8DcW0zH0y0yv3wSHh+Rcw@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] map_partition_varattnos() and whole-row vars  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Jul 28, 2017 at 3:26 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> (Boy, our implementation of DROP COLUMN is painful!  If we really got
>> rid of columns when they were dropped we could've avoided this whole
>> mess.)
>
> I think the pain arises mostly from the decision to allow partitions
> to not all have identical rowtype.  I would have lobbied against that
> choice if I'd been paying more attention at the start ... but I wasn't.

Given the way DROP COLUMN works, I can't really imagine that being a
hit with end users even if you'd won the argument on this list.  It
would be totally reasonable to ask users to put the columns in the
same order in all partitions, but asking them to have
identically-sized and positioned dropped columns is full of fail.

On the other hand, if DROP COLUMN didn't work this way, then you'd
definitely have won that argument and we would be spared this bug (and
many others).

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



pgsql-hackers by date:

Previous
From: Ashutosh Sharma
Date:
Subject: Re: [HACKERS] pl/perl extension fails on Windows
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] pl/perl extension fails on Windows