Re: [HACKERS] WITH clause in CREATE STATISTICS
От | Alvaro Herrera |
---|---|
Тема | Re: [HACKERS] WITH clause in CREATE STATISTICS |
Дата | |
Msg-id | 20170504184833.rex3v67s3gxmaqjt@alvherre.pgsql обсуждение исходный текст |
Ответ на | Re: [HACKERS] WITH clause in CREATE STATISTICS (Simon Riggs <simon@2ndquadrant.com>) |
Ответы |
Re: [HACKERS] WITH clause in CREATE STATISTICS
|
Список | pgsql-hackers |
Here's a patch implementing this idea. From gram.y's comment, the support syntax is now: /***************************************************************************** * * QUERY : ! * CREATE STATISTICS stats_name [(stat types)] arguments ! ! * where 'arguments' can be one or more of: ! * { ON (columns) ! * | FROM relations ! * | WITH (options) ! * | WHERE expression } Note that I removed the USING keyword in the stat types list, and also made it mandatory that that list appears immediately after the new stats name. This should make it possible to have USING in the relation list (the FROM clause), if we allow explicit multiple relations with join syntax there. The other options can appear in any order. Also, both WITH and WHERE are accepted by the grammar, but immediately throw "feature not implemented" error at parse time. I was on the fence about adding copy/equal/out support for the new StatisticArgument node; it seems pointless because that node does not leave gram.y anyway. Unless there are objections, I'll push this tomorrow. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Вложения
В списке pgsql-hackers по дате отправления: