Change position of field "transformed" in struct CreateStatsStmt.
authorNoah Misch <noah@leadboat.com>
Fri, 11 Jun 2021 04:56:14 +0000 (21:56 -0700)
committerNoah Misch <noah@leadboat.com>
Fri, 11 Jun 2021 04:56:14 +0000 (21:56 -0700)
Resolve the disagreement with nodes/*funcs.c field order in favor of the
latter, which is better-aligned with the IndexStmt field order.  This
field is new in v14.

Discussion: https://postgr.es/m/20210611045546.GA573364@rfd.leadboat.com

src/backend/parser/parse_utilcmd.c
src/include/nodes/parsenodes.h

index d5b67d48cfcfc1bb466ad229e143a864c60ac8ad..c9708e38f4680d1d4f3f496acb23bfd02d5b904b 100644 (file)
@@ -1980,8 +1980,8 @@ generateClonedExtStatsStmt(RangeVar *heapRel, Oid heapRelid,
        stats->exprs = def_names;
        stats->relations = list_make1(heapRel);
        stats->stxcomment = NULL;
-       stats->if_not_exists = false;
        stats->transformed = true;      /* don't need transformStatsStmt again */
+       stats->if_not_exists = false;
 
        /* Clean up */
        ReleaseSysCache(ht_stats);
index 58328c437740e45e5c37657a2ca6ace8211abd95..def9651b341c90d7b032d5a9bd36eda65b34276a 100644 (file)
@@ -2912,8 +2912,8 @@ typedef struct CreateStatsStmt
        List       *exprs;                      /* expressions to build statistics on */
        List       *relations;          /* rels to build stats on (list of RangeVar) */
        char       *stxcomment;         /* comment to apply to stats, or NULL */
-       bool            if_not_exists;  /* do nothing if stats name already exists */
        bool            transformed;    /* true when transformStatsStmt is finished */
+       bool            if_not_exists;  /* do nothing if stats name already exists */
 } CreateStatsStmt;
 
 /*