> On 18 Sep 2020, at 06:58, PG Bug reporting form <noreply@postgresql.org> wrote:
> psql:dump.sql:50: ERROR: column "b" of relation "gtest1_1" is a generated
> column
I can reproduce this in git HEAD too. Off the cuff, ISTM that we should only
dump attrdefs for local columns during non-upgrade dumps? It works for normal
DEFAULTs but the restored db will have different :location for the attrdef.
For generated columns it errors out as shown above. I don't really follow the
reason for why we redo the normal DEFAULT for non-local columns today, is that
intentional?
The attached, potentially naive, patch fixes the above issue and passes pg_dump
and pg_upgrade tests.
cheers ./daniel