Re: BUG #16622: pg_dump produces erroneus ALTER TABLE statement for a table with an inherited generated column

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: BUG #16622: pg_dump produces erroneus ALTER TABLE statement for a table with an inherited generated column
Дата
Msg-id 3B0AA616-F9E9-40F4-9350-2F82E6E88BC9@yesql.se
обсуждение исходный текст
Ответ на BUG #16622: pg_dump produces erroneus ALTER TABLE statement for a table with an inherited generated column  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #16622: pg_dump produces erroneus ALTER TABLE statement for a table with an inherited generated column  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
> 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


Вложения

В списке pgsql-bugs по дате отправления:

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #16623: JSON select query result is getting differed when we change DB version
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #16623: JSON select query result is getting differed when we change DB version