Re: Dumping/restoring fails on inherited generated column

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Dumping/restoring fails on inherited generated column
Дата
Msg-id 22de27f6-7096-8d96-4619-7b882932ca25@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Dumping/restoring fails on inherited generated column  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Dumping/restoring fails on inherited generated column
Список pgsql-hackers
On 2021-01-29 17:41, Tom Lane wrote:
> Also, in the example from [2],
> 
> d3=# create table pp1 (a int, b int GENERATED ALWAYS AS (a * 2) STORED);
> CREATE TABLE
> d3=# create table cc1 (a int, b int GENERATED ALWAYS AS (a * 3) STORED);
> CREATE TABLE
> d3=# alter table cc1 inherit pp1;
> ALTER TABLE
> 
> pg_dump now omits to dump cc1's generation expression, which seems
> strictly worse than before.  Admittedly, the backend likely ought to
> be rejecting this scenario, but it doesn't do so today.
> 
> [2]https://www.postgresql.org/message-id/661371.1601398006%40sss.pgh.pa.us

Here is a WIP patch to address this.  Probably needs another look for 
column number mapping and all the usual stuff, but the basic idea should 
be okay.

-- 
Peter Eisentraut
2ndQuadrant, an EDB company
https://www.2ndquadrant.com/

Вложения

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Key management with tests
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Next Commitfest Manager.