Add CREATE SCHEMA ... LIKE support - Mailing list pgsql-hackers

From David G. Johnston
Subject Add CREATE SCHEMA ... LIKE support
Date
Msg-id CAKFQuwZFAkGMoV0fLtf+HJL4_cwivz0Vqfk1r5SemUZvNNfxkg@mail.gmail.com
Whole thread
In response to Add CREATE SCHEMA ... LIKE support  ("Matheus Alcantara" <matheusssilv97@gmail.com>)
Responses Re: Add CREATE SCHEMA ... LIKE support
List pgsql-hackers
On Friday, February 6, 2026, Matheus Alcantara <matheusssilv97@gmail.com> wrote:

I'm attaching a PoC patch that implements the LIKE syntax for tables and
indexes. I would like to start a discussion to see if this feature make
sense and if it could be useful to have at core. I have intention to add
support for more objects(sequence, functions, ...) in future patches if
It makes sense.

I’d suggest you solve the functions cloning first to make sure that won’t end up being a blocker.  SET clauses in particular, and “atomic” functions, seem non-trivial to deal with.  Views too really, depending on the approach.

More generally maybe start with the documentation to define exactly how it should behave and what limitations it would have (i.e., it isn’t going to re-point schema references in black-box function bodies).

David J.

pgsql-hackers by date:

Previous
From: Pavlo Golub
Date:
Subject: Re: [PATCH] Add last_executed timestamp to pg_stat_statements
Next
From: Andrew Dunstan
Date:
Subject: Re: [PING] fallocate() causes btrfs to never compress postgresql files