Re: BUG #19013: When creating a table with the "...LIKE...INCLUDING ALL" construct, REPLICA IDENTITY output is wrong - Mailing list pgsql-bugs

From Álvaro Herrera
Subject Re: BUG #19013: When creating a table with the "...LIKE...INCLUDING ALL" construct, REPLICA IDENTITY output is wrong
Date
Msg-id 202508061804.wwf4zc7npayp@alvherre.pgsql
Whole thread Raw
In response to Re: BUG #19013: When creating a table with the "...LIKE...INCLUDING ALL" construct, REPLICA IDENTITY output is wrong  ("dbman@sqlexec.com" <dbman@sqlexec.com>)
List pgsql-bugs
On 2025-Aug-06, dbman@sqlexec.com wrote:

> Good point aboutg the default value for pg_class.relreplident is always "d",
> but maybe it should be "n" which indicates there is no REPLICA IDENTITY. 

I think this behavior is just an oversight made when replica identity
was introduced.  Commit 07cacba983ef didn't touch the CREATE TABLE LIKE
code.

To me, it makes sense to copy the replica identity definition if
INCLUDING INDEXES or INCLUDING CONSTRAINTS is given.

Patching released branches seems out of the question (it might disrupt
working workflows), but for 19 it isn't, if we agree on an ideal
behavior.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"Siempre hay que alimentar a los dioses, aunque la tierra esté seca" (Orual)



pgsql-bugs by date:

Previous
From: "dbman@sqlexec.com"
Date:
Subject: Re: BUG #19013: When creating a table with the "...LIKE...INCLUDING ALL" construct, REPLICA IDENTITY output is wrong
Next
From: "David G. Johnston"
Date:
Subject: Re: BUG #19013: When creating a table with the "...LIKE...INCLUDING ALL" construct, REPLICA IDENTITY output is wrong