| From: | Marcos Pegoraro <marcos(at)f10(dot)com(dot)br> |
|---|---|
| To: | Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com> |
| Cc: | Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: [PATCH] Add pg_get_table_ddl() to reconstruct CREATE TABLE statements |
| Date: | 2026-07-01 15:10:49 |
| Message-ID: | CAB-JLwY1O-owU39ebG=fJZo0z2j+2z=y5R+w8pmpHx9GNqvnOw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Em qua., 1 de jul. de 2026 às 11:12, Akshay Joshi <
akshay(dot)joshi(at)enterprisedb(dot)com> escreveu:
> pretty, owner, tablespace, and schema_qualified are plain boolean
> parameters with DEFAULT values
> *Filtering parameters:* *only_kinds* / *except_kinds* as text[]
>
>> If all parameters are optional, and all parameters are boolean, perhaps
you could also make pretty, owner, tablespace, and schema_qualified as
optional parts of only_kinds and except_kinds.
Therefore, we could call these two ways and the result would be the same.
pg_get_table_ddl('idxd'::regclass, owner => false, tablespace =>
false, except_kinds
=> '{primary_key}');
pg_get_table_ddl('idxd'::regclass, except_kinds => '{primary_key,tablespace,
owner}');
Obviously this way you have to know if owner param is false or it exists on
except_kinds.
What do you think ?
regards
Marcos
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kirk Wolak | 2026-07-01 15:17:57 | Re: [GSoC 2026] - B-tree Index Bloat Reduction - Approach & Questions |
| Previous Message | jian he | 2026-07-01 15:03:54 | Re: The PostgreSQL C Dialect |