Re: Add CREATE SCHEMA ... LIKE support

From: Matheus Alcantara <matheusssilv97(at)gmail(dot)com>
To: Marcos Pegoraro <marcos(at)f10(dot)com(dot)br>, Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add CREATE SCHEMA ... LIKE support
Date: 2026-02-13 21:15:13
Message-ID: c0ec9f04-044f-4bb1-adf8-8245295fceaf@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12/02/26 17:27, Marcos Pegoraro wrote:
> Em qui., 12 de fev. de 2026 às 13:40, Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
> escreveu:
>
>> What do you think about introducing a clause similar to COPY .
>
>
> A schema can have thousands of objects, and that schema will be ok only if
> all objects are copied.
> It will be very difficult for the user to see which ones were not copied.
>
> I think the whole process should be done or raise an exception. Ignoring
> items I don't think is fine.
>

Yeah, I agree. I think that we can be less restrictive. The behavior
can be to allow reference objects from schemas different than source
and in case some error happen it stop the process. This behavior
should be documented.

In case of e.g table partitions which the parent is in different
schema the overlap error will happen and the the process will stop.
For another cases like types in different schema it will work normally.

--
Matheus Alcantara
EDB: https://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2026-02-13 21:56:42 Fix more multibyte issues in ltree
Previous Message Andres Freund 2026-02-13 21:13:39 Re: Adding locks statistics