From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: partitioning and identity column |
Date: | 2024-01-22 12:02:30 |
Message-ID: | 2f110378-f20e-419b-bc76-98058536a223@eisentraut.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 17.01.24 06:36, Ashutosh Bapat wrote:
> On Wed, Jan 17, 2024 at 12:30 AM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>>
>> On 09.01.24 15:10, Ashutosh Bapat wrote:
>>> Here's complete patch-set.
>>
>> Looks good! Committed.
>>
>
> Thanks a lot Peter.
I found another piece of code that might need updating, or at least the
comment.
In MergeAttributes(), in the part that merges the specified column
definitions into the inherited ones, it says
/*
* Identity is never inherited. The new column can have an
* identity definition, so we always just take that one.
*/
def->identity = newdef->identity;
This is still correct for regular inheritance, but not for partitioning.
I think for partitioning, this is not reachable because you can't
specify identity information when you create a partition(?). So maybe
something like
if (newdef->identity)
{
Assert(!is_partioning);
/*
* Identity is never inherited. The new column can have an
* identity definition, so we always just take that one.
*/
def->identity = newdef->identity;
}
Thoughts?
From | Date | Subject | |
---|---|---|---|
Next Message | Junwang Zhao | 2024-01-22 12:10:53 | Re: make dist using git archive |
Previous Message | Masahiko Sawada | 2024-01-22 11:58:05 | Re: Synchronizing slots from primary to standby |