public inbox for [email protected]  
help / color / mirror / Atom feed
From: Marcos Pegoraro <[email protected]>
To: Akshay Joshi <[email protected]>
Cc: Zsolt Parragi <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] Add pg_get_table_ddl() to reconstruct CREATE TABLE statements
Date: Thu, 2 Jul 2026 13:35:41 -0300
Message-ID: <CAB-JLwYy_khadXQxn9Wg1H66F6+sCM7TXNare1oLEW5ZAwrjqQ@mail.gmail.com> (raw)
In-Reply-To: <CANxoLDcGVyoRtCLoY4qqJtXDNk4BxsrDz3MZ8vBJJOLRgBZd9A@mail.gmail.com>
References: <CANxoLDfjQnhM=E6JSyYo9s9OdjqoN8s_3wE5yL=kaDu_X8j-dA@mail.gmail.com>
	<CANxoLDcxmXNHNyPt5v+LaBJVJmyt=j95D7TDE9SepoM7y15t-w@mail.gmail.com>
	<CAN4CZFNqf41TCg1ENccq6DAYQpArCbnKUSidHnRKaVMWGj5pBA@mail.gmail.com>
	<CANxoLDfL1AxL=k9SsRNReKQ-sJUSy6RvCqeog5HWckFxff=0Pg@mail.gmail.com>
	<CAN4CZFP5-fAGwxMCyKGePgp3N8NCpoFXkruO=5xjTC=gPwqYxw@mail.gmail.com>
	<CANxoLDc6UFMsyzbXKF8SpMoXdoKE=-yRPqtvyBMKKJ2zOUKX4A@mail.gmail.com>
	<CAN4CZFMhnZyQsdLC5iZNego77JHJyP6J_4CpWu=99vKHCd-vzg@mail.gmail.com>
	<CANxoLDco7z7Fj7_pj_3YQLvjq8ZH2Ai4c3GcOamed01fZhJ77Q@mail.gmail.com>
	<CAB-JLwY=RYPJhdFid0YDqk1L1OQPuHFz9J2tOeeVCFLjov+Ktg@mail.gmail.com>
	<CANxoLDdRts-F+QxL+wtM8529Z3+TUJku8PKy3WoxcWBs7zQJ-w@mail.gmail.com>
	<CAB-JLwbyzF+JRPCoLCf-H6dQ_1+-O_wBZcESRdC6_H2z+-d-gg@mail.gmail.com>
	<CANxoLDcWwoWOxvmV_uBBUsbGf+_AZzBV1GkcjoX+omNpcrCNMQ@mail.gmail.com>
	<CAN4CZFM99cGopPJXD_t05+Y9CnocOOTipfXCzoAfBUFSC-i4+A@mail.gmail.com>
	<CANxoLDejn2JFXF7kVMtcznW6XyessrJ7WToSaQau2GxBdAGSUg@mail.gmail.com>
	<[email protected]>
	<CANxoLDe_GOXyyZs7GN3VUJoT+o1DwqZGhid-TWWvS0D8d5ggYw@mail.gmail.com>
	<[email protected]>
	<CANxoLDdq06oXRYuzYfn2gkn3yfoxp=nA14xu5p+qSEOzpHXEMQ@mail.gmail.com>
	<CANxoLDdEBYzKfj3NGrP5PjoTa-eCViWPkFR-sXLq4bUnbokyPA@mail.gmail.com>
	<CAN4CZFPKAr2VfxGMTA4CkMPHVSnpQrRKJcwUH1ZLh4eHG09LSw@mail.gmail.com>
	<CANxoLDe308ogjUZD4DLjaMysJzHZ4z3SOXbUTyC7SAEKvSgqcw@mail.gmail.com>
	<CAHWVJhHW4jcfS=w20Ungecb3A4uWiHe9OM9OLHHBtokhKaCs=w@mail.gmail.com>
	<CANxoLDcAy+46QesKdK95XFM3z9eT6PsiJ4Tx_GSQmtbg1O7Evw@mail.gmail.com>
	<CANxoLDd0KT+5fHOyTi0Fu5Jwme0+a5S2aAVj=iCVsqkpvF_2TA@mail.gmail.com>
	<CAN4CZFPxokhJ2vTiTu9Bhj+v7T+5jZd4pjT7QXdjoZ4Vqv5KhQ@mail.gmail.com>
	<CANxoLDdVEjCCKch1O-5J6ghw89b2fkWC1ADPYTUwxu8WB-hQbw@mail.gmail.com>
	<CAB-JLwY1O-owU39ebG=fJZo0z2j+2z=y5R+w8pmpHx9GNqvnOw@mail.gmail.com>
	<CANxoLDcGVyoRtCLoY4qqJtXDNk4BxsrDz3MZ8vBJJOLRgBZd9A@mail.gmail.com>

Em qui., 2 de jul. de 2026 às 04:49, Akshay Joshi <
[email protected]> 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


view thread (54+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: [PATCH] Add pg_get_table_ddl() to reconstruct CREATE TABLE statements
  In-Reply-To: <CAB-JLwYy_khadXQxn9Wg1H66F6+sCM7TXNare1oLEW5ZAwrjqQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox