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

From hubert depesz lubaczewski
Subject Re: Add CREATE SCHEMA ... LIKE support
Date
Msg-id aYYKQDln_qjA_CdA@depesz.com
Whole thread Raw
In response to Re: Add CREATE SCHEMA ... LIKE support  (Jim Jones <jim.jones@uni-muenster.de>)
List pgsql-hackers
On Fri, Feb 06, 2026 at 04:23:45PM +0100, Jim Jones wrote:
> 
> 
> On 06/02/2026 15:42, Matheus Alcantara wrote:
> > On 06/02/26 11:35, Jim Jones wrote:
> >> So EXCEPT instead of EXCLUDING and LIMIT TO instead of INCLUDING. Of
> >> course, assuming the proposed syntax isn't already defined in the SQL
> >> standard.
> >>
> > 
> > Yeah, it could be an option but IMHO adding the LIKE on CREATE SCHEMA
> > sounds more similar to what we already have for CREATE TABLE ... LIKE.
> > 
> > Although I prefer the CREATE SCHEMA LIKE syntax I'm open to discuss
> > about other syntaxes.
> 
> Just to be clear, I also like the CREATE SCHEMA <name> LIKE
> <source_schema> syntax. I was just suggesting to consider changing
> EXCLUDING and INCLUDING to EXCEPT and LIMIT TO, respectively. Just to
> make it more consistent with IMPORT FOREIGN SCHEMA, although I find
> INCLUDING and EXCLUDING way more intuitive :)

The way I see it EXCLUDING and INCLUDING are for TYPES of objects (like:
EXCLUDING indexes), while EXCEPT and LIMIT TO are for specific objects
(EXCEPT users).

Best regards,

depesz




pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: [PING] fallocate() causes btrfs to never compress postgresql files
Next
From: Florents Tselai
Date:
Subject: doc: add note that wal_level=logical doesn't set up logical replication in itself