Re: Fix propagation of persistence to sequences in ALTER TABLE / ADD COLUMN

2024-02-08 Thread Peter Eisentraut
On 08.02.24 07:04, Ashutosh Bapat wrote: The patch looks ok. +seqstmt->sequence->relpersistence = cxt->rel ? cxt->rel->rd_rel->relpersistence : cxt->relation->relpersistence; + This condition looks consistent with the other places in the code around line 435, 498. Ah good, that pattern al

Re: Fix propagation of persistence to sequences in ALTER TABLE / ADD COLUMN

2024-02-07 Thread Ashutosh Bapat
On Mon, Feb 5, 2024 at 9:21 PM Peter Eisentraut wrote: > > Commit 344d62fb9a9 (2022) introduced unlogged sequences and made it so > that identity/serial sequences automatically get the persistence level > of their owning table. But this works only for CREATE TABLE and not for > ALTER TABLE / ADD