Re: Dumping/restoring fails on inherited generated column

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Dumping/restoring fails on inherited generated column
Дата
Msg-id 0dbc982e-fbb3-911e-eb80-130494664940@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Dumping/restoring fails on inherited generated column  (Zhihong Yu <zyu@yugabyte.com>)
Ответы Re: Dumping/restoring fails on inherited generated column  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Список pgsql-hackers
On 2021-02-04 01:17, Zhihong Yu wrote:
> Hi,
> +           if (attribute->attgenerated && !childatt->attgenerated)
> +               ereport(ERROR,
> ...
> +           if (attribute->attgenerated && childatt->attgenerated)
> +           {
> 
> Looks like for the second if statement, 
> checking attribute->attgenerated should be enough (due to the check from 
> the first if statement).

Thanks for taking a look.  I figured the way I wrote it makes it easier 
to move the code around or insert other code in the future and doesn't 
make it so tightly coupled.

Anyway, I figured out how to take account of generation expressions with 
different column orders.  I used the same approach that we use for check 
constraints.  The attached patch is good to go from my perspective.

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

Вложения

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

Предыдущее
От: Mark Rofail
Дата:
Сообщение: Re: [HACKERS] GSoC 2017: Foreign Key Arrays
Следующее
От: Dilip Kumar
Дата:
Сообщение: Re: [HACKERS] Custom compression methods