pgsql: Fix check for child column generation status matching parent. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Fix check for child column generation status matching parent.
Date
Msg-id E1pSo2m-001V4Y-Kw@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix check for child column generation status matching parent.

In commit 8bf6ec3ba, I mistakenly supposed that MergeAttributes'
loop over saved_schema was reprocessing column definitions that
had already been checked earlier: there is a variant syntax for
creating a child partition in which that's not true.  So we need
to duplicate the full check appearing further up.

(Actually, I believe that the "if (restdef->identity)" part is
not reachable, because we reject identity on partitions earlier.
But it seems wise to keep the check, in case that's ever relaxed,
and to keep this code in sync with the other instance.)

Per report from Alexander Lakhin.

Discussion: https://postgr.es/m/4a8200ca-8378-653e-38ed-b2e1f1611aa6@gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a0fa18cc0d6e4dc3dc24b57ae11253356c55d6c4

Modified Files
--------------
src/backend/commands/tablecmds.c        | 37 ++++++++++++++++++++++++---------
src/test/regress/expected/generated.out | 16 ++++++++++++++
src/test/regress/sql/generated.sql      | 12 +++++++++++
3 files changed, 55 insertions(+), 10 deletions(-)


pgsql-committers by date:

Previous
From: Andrew Dunstan
Date:
Subject: pgsql: pgindent: mention directory arguments in help text
Next
From: Thomas Munro
Date:
Subject: pgsql: Remove obsolete platforms from ps_status.c.