Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d5yIA-0001cU-Kq for pgsql-hackers@arkaria.postgresql.org; Wed, 03 May 2017 17:42:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d5yIA-0005rC-7U for pgsql-hackers@arkaria.postgresql.org; Wed, 03 May 2017 17:42:22 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d5yI9-0005q3-6v for pgsql-hackers@postgresql.org; Wed, 03 May 2017 17:42:21 +0000 Received: from tamriel.snowman.net ([72.66.115.51]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d5yI6-00031i-RG for pgsql-hackers@postgresql.org; Wed, 03 May 2017 17:42:20 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id E23385F794; Wed, 3 May 2017 13:41:48 -0400 (EDT) Date: Wed, 3 May 2017 13:41:48 -0400 From: Stephen Frost To: Alvaro Herrera Cc: Simon Riggs , Tomas Vondra , PostgreSQL-development Subject: Re: WITH clause in CREATE STATISTICS Message-ID: <20170503174148.GA21223@tamriel.snowman.net> References: <20170503151801.4u46436mc64r2bfa@alvherre.pgsql> <20170503172746.rwftidszir67sgk7@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="RYLajQ58OAnL4YcY" Content-Disposition: inline In-Reply-To: <20170503172746.rwftidszir67sgk7@alvherre.pgsql> X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-91-generic (x86_64) X-Uptime: 13:38:23 up 298 days, 19:02, 37 users, load average: 0.13, 0.20, 0.17 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org --RYLajQ58OAnL4YcY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Alvaro, * Alvaro Herrera (alvherre@2ndquadrant.com) wrote: > Alvaro Herrera wrote: >=20 > > In the meantime, I noticed that pg_dump support for extstats is not > > covered, which I'll go fix next. >=20 > Here I add one, which seems to work for me. >=20 > 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 .=3D $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 --RYLajQ58OAnL4YcY Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJZChZcAAoJEO1sijiDR2RVwDMP/0CMznoOvqp0YcRfnykcw2eR YsChuhYbeZ7MT65EihyaOvP5h3u6XdnwwTsJa4LyXxAh3uGJJR4icIhHs/TsSJg1 8jm+7Rd90zNVTjyzPwHCjSAkusZEV+5hAHDtgUlkOsGsa2kuv6zX5Y4Ns3OIeF/2 KqxBwGbRo/f3Dwl/qu6LHUF4op20tSCvUOtcRvLan30t7ShQ6lJFncIdnWHtB2c6 4IlaMUGUyWNkvslz4dxbJdvxY9XAIZQduuzxsPaw5QO9ExfP5JHJ6vR6kPF4vqWf zxfMhLrYt8XXVYRgwhaRKWR6p2i25xREGvegedjNGh88MFIU4cXLzYFAVAqil+NR TRLxrT/f97c5eyJNZv6pcqbSz9lRZfNHjb6xcasCSfG8xofwRC7FxH+4H9BJXIbU sA3TzgrwRxZ3VBCF0+sh0IJTuHL+whu+OkKPlqlbvmvXMmKXIZhW702fwTwvcGgC MUrm8rP8YJvngwwbNwe8DsSlrHd2azpjHItEO0bE0FKGCtbP/QKpW4fR1bK/4unj VPUDV43YSzE4C5cU2MjeI1lb0kUVmYbtMW8sXEiGekGEeooM8Zb54AG0RgEpuyhr yl7iBE1sxoEeBKTQESLEo0PwDQ2X7roX/QfHdqqKk4Cgv2LrVcTzV95OFZi9W98x 0u9/J1nBZSy9nGmZLmmf =4hnm -----END PGP SIGNATURE----- --RYLajQ58OAnL4YcY--