Re: create table like including storage parameter - Mailing list pgsql-hackers

From jian he
Subject Re: create table like including storage parameter
Date
Msg-id CACJufxG4w4hdM6Bu3pZNV2nOGbjMYiCmAN=zfh0BeGK-Dg7hvA@mail.gmail.com
Whole thread
In response to Re: create table like including storage parameter  (lakshmi <lakshmigcdac@gmail.com>)
List pgsql-hackers
On Tue, Apr 28, 2026 at 3:24 PM lakshmi <lakshmigcdac@gmail.com> wrote:
>
> Hi all,
>
> I tested the patch on current HEAD.
>
> INCLUDING PARAMETERS works as expected. It correctly copies storage parameters. Duplicate parameters raise an error,
andexisting LIKE behavior remains unchanged. 
>
> When used with a VIEW, parameters are ignored (since they are not valid for tables), and the command completes
withouterror. 
>
> Overall, the feature looks good from my testing. It might be worth documenting the behavior for VIEWs.
>

CREATE TABLE t (a int) WITH (fillfactor = 70);
CREATE TABLE p (LIKE t INCLUDING ALL) PARTITION BY LIST (a);
ERROR:  42809: cannot specify storage parameters for a partitioned table
HINT:  Specify storage parameters for its leaf partitions instead.
LOCATION:  partitioned_table_reloptions, reloptions.c:2350

The abvove ERROR seems not necessary.
So I made the CREATE TABLE (...) PARTITION BY ignore the PARAMETERS option.



--
jian
https://www.enterprisedb.com/

Attachment

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: parallel autovacuum: Propagate track_cost_delay_timing to parallel workers
Next
From: Sami Imseih
Date:
Subject: Re: parallel autovacuum: Propagate track_cost_delay_timing to parallel workers