Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)? - Mailing list pgsql-hackers

From David Rowley
Subject Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?
Date
Msg-id CAKJS1f8+e+CJGkavFpN5Bzpxiga0DyPY-m3EgERa5gCMvAYq1g@mail.gmail.com
Whole thread Raw
In response to Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
On 6 March 2018 at 11:43, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
> Pushed now, to branches master and pg10, with Tomas changes.  I made a
> few changes of my own

Great! Many thanks to both of you for making those changes and thanks
Alvaro for pushing.

> 3. I chose not to backpatch the node->stxcomment thing.  It makes me
> nervous to modify a parse node.  So cloning the comments is a PG11
> thing.  Hopefully it's not *too* bad ...

Makes sense. We've had other objects previously that the comments were
lost sometimes, and I don't think they were noticed too quickly, so
perhaps this is an unlikely case that will bother too many people.

> 4. See elsewhere in the thread about list_copy vs. list_concat :-)

I saw that. Thanks for fixing. The only weird thing I see in the
changes is that the comment here claims it makes a copy, but it does
not.

+ * Right now, there's nothing to do here, so we just copy the list.
+ */
+static void
+transformExtendedStatistics(CreateStmtContext *cxt)
+{
+   cxt->alist = list_concat(cxt->alist, cxt->extstats);


-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: inserts into partitioned table may cause crash
Next
From: Edmund Horner
Date:
Subject: Re: PATCH: psql tab completion for SELECT