Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?
David Rowley <david.rowley@2ndquadrant.com>
From: David Rowley <david.rowley@2ndquadrant.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>, "David G. Johnston" <david.g.johnston@gmail.com>,
Tom Lane <tgl@sss.pgh.pa.us>, Tels <nospam-pg-abuse@bloodgate.com>, Stephen Froehlich <s.froehlich@cablelabs.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2018-03-06T07:21:24Z
Lists: pgsql-hackers, pgsql-novice
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
Commits
-
Clone extended stats in CREATE TABLE (LIKE INCLUDING ALL)
- 911e6236bab5 10.4 landed
- 5564c1181548 11.0 landed
-
Identity columns
- 321732705363 10.0 cited