| 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-02 16:35:41 |
| Message-ID: | CAB-JLwYy_khadXQxn9Wg1H66F6+sCM7TXNare1oLEW5ZAwrjqQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Em qui., 2 de jul. de 2026 às 04:49, Akshay Joshi <
akshay(dot)joshi(at)enterprisedb(dot)com> escreveu:
> *owner* is the one case where it could work, but to make it consistent
> with how owner behaves in pg_get_tablespace_ddl and pg_get_database_ddl, we
> should not add it.
>
> *tablespace* doesn't map to a kind at all. It controls the inline
> TABLESPACE clause within the CREATE TABLE statement body it's a sub-clause,
> not a separate statement. If we added tablespace as a kind, except_kinds =>
> '{table,tablespace}' would be wrong (if you're skipping the table
> statement, there's no inline clause to suppress), and except_kinds =>
> '{tablespace}' would imply skipping a standalone statement that doesn't
> exist.
>
> *pretty* and *schema_qualified* are rendering/formatting options, not
> statement filters. They affect how every statement is rendered —
> indentation, name qualification — not which statements are emitted. Putting
> them in except_kinds conflates two orthogonal axes: filtering (what to
> emit) and formatting (how to emit it).
>
>>
Well, I thought you could continue with the same variable structure, just
assigning them beforehand if those values were used in the kind list.
So, TableDdlContext continues the same, you just add
TABLE_DDL_KIND_NO_OWNER and others to TableDdlKind
And before anything you see if TableDdlKind->TABLE_DDL_KIND_NO_OWNER is set
then TableDdlContext->no_owner receives that value, just that.
regards
Marcos
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Greg Burd | 2026-07-02 16:40:51 | Re: Tepid: selective index updates for heap relations |
| Previous Message | Florin Irion | 2026-07-02 16:35:24 | pg_plan_advice: add NO_ scan and join method tags |