Hello,

On 2026-Feb-06, Matheus Alcantara wrote:

> I was reading the TODO wiki page and found the "Add CREATE SCHEMA ...
> LIKE that copies a schema" item and I thought that it could be a good
> idea to have this at core.

Egad.  A TODO thing from way back which probably doesn't make much sense
nowadays, or at least so I think.

This whole thing seems like a giant can of worms, and I'm not sure it's
a good idea to add DDL syntax for it.  I didn't read the thread in
detail, but the discussions downthread about adding weird clauses to
CREATE SCHEMA look quite worrisome.

Why not try to devise a way to reuse the DDL functions being proposed in
various nearby pgsql-hackers threads?  There are a bunch of such patches
in the commitfest already; it's probably easy to have a way to generate
a list of objects in a schema, then call the DDL function corresponding
to each object type for each object, and then you're done.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/


Reply via email to