On Wed, Feb 15, 2023 at 13:57 PM Amit Kapila <amit.kapil...@gmail.com> wrote: > On Fri, Feb 10, 2023 at 8:23 PM Masahiko Sawada > <sawada.m...@gmail.com> > wrote: > > > > On Thu, Feb 9, 2023 at 6:55 PM Ajin Cherian <itsa...@gmail.com> wrote: > > > > > (v67) > > > > I have some questions about adding the infrastructure for DDL deparsing. > > > > Apart from the changes made by 0001 patch to add infrastructure for > > DDL deparsing, 0002 patch seems to add some variables that are not > > used in 0002 patch: > > > > @@ -2055,6 +2055,7 @@ typedef struct AlterTableStmt > > List *cmds; /* list of subcommands */ > > ObjectType objtype; /* type of object */ > > bool missing_ok; /* skip error if table > > missing */ > > + bool table_like; /* internally generated for > > TableLikeClause */ > > } AlterTableStmt; > > > > @@ -39,6 +40,7 @@ typedef struct CollectedATSubcmd { > > ObjectAddress address; /* affected column, > > constraint, index, ... */ > > Node *parsetree; > > + char *usingexpr; > > } CollectedATSubcmd; > > > > typedef struct CollectedCommand > > @@ -62,6 +64,7 @@ typedef struct CollectedCommand > > { > > Oid objectId; > > Oid classId; > > + bool rewrite; > > List *subcmds; > > } alterTable; > > > > These three variables are used in 0006 patch. > > > > Hmm, then it should be better to move these to 0006 patch.
Makes sense. Because the variables "table_like" and "usingexpr" are used in 0002 patch, so I only moved "rewrite" to 0006 patch. Best Regards, Hou zj