| From: | Marcos Pegoraro <marcos(at)f10(dot)com(dot)br> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Noah Misch <noah(at)leadboat(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Melanie Plageman <melanieplageman(at)gmail(dot)com>, gonzalemario(at)gmail(dot)com, dbryan(dot)green(at)gmail(dot)com, euler(at)eulerto(dot)com, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: pg_get_*_ddl() needs a redesign |
| Date: | 2026-09-11 16:34:02 |
| Message-ID: | CAB-JLwb4sZSeoLkt15afOhgJ0NoyJZGP6L5zb_t+vUhxoybisg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Em sex., 11 de set. de 2026 às 12:58, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> escreveu:
> I'm voting for "discard the feature".
It's a shame. I don't know how much work this duplication would entail and
whether it's the best way to do it or not, but from a user's point of view,
it's really a shame.
For everyone who works with multi-tenant, these are functions that would
really help to clone schemas, for example.
dump/sed/restore is today the only way to do that today
with that I could
select 'create schema new_schema;' union all
select 'set search_path to new_schema;' union all
select pg_get_table_ddl(oid,schema_qualified=>false) from pg_class where
relkind = 'r' and relnamespace::regclass::text = 'old_schema';
regards
Marcos
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ashutosh Bapat | 2026-09-11 16:41:09 | Property graph, dependencies |
| Previous Message | Álvaro Herrera | 2026-09-11 16:33:52 | Re: REPACK (CONCURRENTLY) decoding worker is canceled by lock_timeout |