Re: [HACKERS] WITH clause in CREATE STATISTICS - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: [HACKERS] WITH clause in CREATE STATISTICS
Date
Msg-id 20170503174148.GA21223@tamriel.snowman.net
Whole thread Raw
In response to Re: [HACKERS] WITH clause in CREATE STATISTICS  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: [HACKERS] WITH clause in CREATE STATISTICS  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Alvaro,

* Alvaro Herrera (alvherre@2ndquadrant.com) wrote:
> Alvaro Herrera wrote:
>
> > In the meantime, I noticed that pg_dump support for extstats is not
> > covered, which I'll go fix next.
>
> Here I add one, which seems to work for me.
>
> Considering that Stephen missed a terminating semicolon for test with
> create_order 96 (the last one prior to my commit) in commit
> 31a8b77a9244, I propose that we change whatever is concatenating those
> strings append a terminating semicolon.  (Surely we don't care about two
> tests stanzas writing a single SQL command by omitting the semicolon
> terminator.)

Whoops, sorry about that.  Yes, we could pretty easily add that.  The
create SQL is built up at the bottom of 002_pg_dump.pl:

$create_sql .= $tests{$test}->{create_sql};

> I wonder if there's any rationale to the create_order numbers.  Surely
> we only care for objects that depend on others.

Yes, it was just a way to manage those dependencies.  If there's value
in doing something more complicated then we could certainly do that, but
I'm not sure why it would be necessary to add that complexity.

Thanks!

Stephen

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] password_encryption, default and 'plain' support
Next
From: Pavel Stehule
Date:
Subject: Re: [HACKERS] CTE inlining