public inbox for [email protected]
help / color / mirror / Atom feedFrom: David G. Johnston <[email protected]>
To: Zsolt Parragi <[email protected]>
Cc: Chao Li <[email protected]>
Cc: Postgres hackers <[email protected]>
Cc: Amit Kapila <[email protected]>
Subject: Re: docs: clarify ALTER TABLE behavior on partitioned tables
Date: Fri, 23 Jan 2026 18:16:23 -0700
Message-ID: <CAKFQuwbUVLeeooQWc0TY7NJS05RexG_fOY5cz2S4H3sDGKQ_qA@mail.gmail.com> (raw)
In-Reply-To: <CAKFQuwZwAuO3qXEeqxwV6vM+89BkB-aSkcXqDGG8e_xBy_Q3Xw@mail.gmail.com>
References: <CAEoWx2=mYhCfsnHaN96Qqwq5b0GVS2YgO3zpVqPPRd_iO52wRw@mail.gmail.com>
<[email protected]>
<CAKFQuwbWNCX1M1e9_-3P9RVGo10huPjuqdL74FJ+-a5EW791KA@mail.gmail.com>
<[email protected]>
<CAKFQuwZ+o6La5DyK9_-L2gpeiKNvGMbR78UjocO4++JkyZaRHw@mail.gmail.com>
<[email protected]>
<CAKFQuwabxFyFQob=RfKOV3upjxwomAzmGzSouN-h2ypuXz+dZg@mail.gmail.com>
<[email protected]>
<CAKFQuwZaquUrTOhfmJ2CenwiyAHx4nORQ0kB01sL+z5pCBuLFQ@mail.gmail.com>
<CAEoWx2mUiCYJEBuo5D74gi7pHfNz82b54oDHjZNtrXRFDnBPOg@mail.gmail.com>
<CAKFQuwbQ=L8w8jEaB8_gW-RrNv2_V-VrFYBump7__z-vh-QJWw@mail.gmail.com>
<CAEoWx2nwoBtWX3=UOQQpGZOuRH5vNv2PHqeFHqDPdiKGaOigiA@mail.gmail.com>
<CAKFQuwZyJNBN+N5Qtcg0aG6ZpOFvQV5m=cALLgv7g3u1Sz-tZw@mail.gmail.com>
<[email protected]>
<CAKFQuwZr_GLBOOLohfEcKVVTcP9D+nzVdUUKabYbXWXRnOFjnA@mail.gmail.com>
<CAEoWx2=CK=QEvpL5HSgFEuFqjO2Q1sDy6a2G-s-+zv+RzB3mTw@mail.gmail.com>
<CAN4CZFNoLSUcVKcOOJgOtTkDuOseCL5j9MQr3tGjb3btD=jHNQ@mail.gmail.com>
<CAKFQuwZwAuO3qXEeqxwV6vM+89BkB-aSkcXqDGG8e_xBy_Q3Xw@mail.gmail.com>
On Fri, Jan 23, 2026 at 5:57 PM David G. Johnston <
[email protected]> wrote:
>
>> "A nonrecursive DROP COLUMN (i.e., ALTER TABLE ONLY ... DROP COLUMN)
>> never removes any descendant columns, but instead marks them as
>> independently defined rather than inherited."
>>
>> This part is now undocumented, it was only mentioned in this paragraph.
>>
>
> True, it's left implied instead of explicitly stated. Any column that
> exists on a child but not the parent is by definition "independently
> defined". So if either ONLY is supplied or the rules for cascading delete
> are not met the result is children with independently defined columns with
> that name.
>
> The original note was wrong anyway for the two-parent case - the second
> parent prevents the marking as independent when the first parent's column
> is dropped.
>
Decided to test this one and I see the original wording was correct and we
will need to keep a note that in the two-parent ONLY case the un-dropped
children are marked both dependent and independent.
Change:
<para>
For inheritance setups, a descendant column is removed only if both
of the
following are true: this is the only parent defining the column, and
the column
was never independently defined in the descendant.
</para>
To:
"For inheritance setups, a descendant column is removed only if all the
following are true: ONLY is not specified, no other parent defines the
column, and the column is not marked as having been independent.
Otherwise, the descendant column is instead marked as having
been independent.
If we think that deserves a bit longer explanation about that/why/how a
column can be both dependent and "having been independent" we should
cross-reference to a more appropriate location. Here we just state this is
one way that condition can materialize.
David J.
view thread (19+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: docs: clarify ALTER TABLE behavior on partitioned tables
In-Reply-To: <CAKFQuwbUVLeeooQWc0TY7NJS05RexG_fOY5cz2S4H3sDGKQ_qA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox