On 2026-Oct-26, shihao zhong wrote:

> Hi Manu,
> 
> Thanks for testing the pg_upgrade, I forgot about that.
> 
> I don't think the logic is wrong here, but maybe we can make some
> improvement to the error message. v2 changes
> 
>   on the partitioned table of each column listed in the file
> =>
>   on the partitioned table of each column. In version 18 this is not
>   allowed on a table with CHECK constraints, so drop them first and
>   add them back afterwards. A list of the problem columns is in the
>   file

I think the doc changes here are not ideal; they kinda suggest that there are
numerous different generated column types for which you can have different
generation expressions except for one special case -- rather than one case yes,
one case no.  How about something like this?

         If a parent column is a generated column, its child column must also
-        be a generated column of the same kind (stored or virtual); however,
-        the child column can have a different generation expression, except
-        that a virtual generated column of a partition must have the same
-        generation expression as the partitioned table.
+        be a generated column of the same kind (stored or virtual).
+        In addition, for virtual generated columns, the child column's
+        generation expression must be identical to that of the parent.
+        For stored generated columns, they are allowed to differ.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"I'm impressed how quickly you are fixing this obscure issue. I came from 
MS SQL and it would be hard for me to put into words how much of a better job
you all are doing on [PostgreSQL]."
 Steve Midgley, http://archives.postgresql.org/pgsql-sql/2008-08/msg00000.php


Reply via email to