Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8rob-0005Of-02 for pgsql-hackers@arkaria.postgresql.org; Thu, 11 May 2017 17:23:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d8roa-00027Z-Ce for pgsql-hackers@arkaria.postgresql.org; Thu, 11 May 2017 17:23:48 +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 1d8rn3-0004xT-AQ for pgsql-hackers@postgresql.org; Thu, 11 May 2017 17:22:13 +0000 Received: from mail-qk0-x22f.google.com ([2607:f8b0:400d:c09::22f]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1d8rn0-00052Y-TA for pgsql-hackers@postgresql.org; Thu, 11 May 2017 17:22:12 +0000 Received: by mail-qk0-x22f.google.com with SMTP id k74so28405359qke.1 for ; Thu, 11 May 2017 10:22:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=ZxH854nOvmAPUHBti+mxTkWD0RnnZw8gDRiuw8f7hVk=; b=W6jxZzz5nYvspGy0vkeWWS05RavnTq9Y16uScxlA6byFWg6tVG3nuo2R5hhZYfnAnT oD7jegDfiJDKO+QvpisgjiDM4dDnTE5VIQAKLvrt1lv06c64NLf8T81O42P3k63SXwbY EiCtMXpZY57a87l6k4/xXsyC7ucAqNAiQyS1G/eBj7sKahfbmzfHKqKERzuECVHtDXrb e1M/f8WMGnhp8a+E1RYDYyyNcVJ5V3PKBPqd7V91O2d2SdrA7B1127Vmpn3jr0ad5Hf7 esA7E8+ASxMK45Sw55KDBD8fCIQlKhykbU0Ii7xH6pw4VT1PbT+WGIidY9ovJ4WhdbfV MEYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=ZxH854nOvmAPUHBti+mxTkWD0RnnZw8gDRiuw8f7hVk=; b=U/c7VDwQbu+WEXoHsw/MGOA3MF7gOSRamoNx4FPHx3vgRk3EB8hg8lN+H9MMSVZDjP YeK7hBA83dokkMrY4m9t2CPgzK+FDbDQ14jvJM1FwkxlPKvexn7Vfd1FeNXH7AnmW9TL ohOaCZflebze+z8v0JhHykVd/9NvxpdfJqFDvibIUq3Mu+/+Zk3k4LKvcFR05ZDSwXlA scpj+Y08nS49fNgJ2AqHTQe5+/nAy1RclGFKDkwieViSgPbNwypD/8U+XyWzHR7Ae3bh vuXkFG1d+Y96Bq7xj94QQ3w4GfKNj9qd6oVY8Jj5GQTxw35U7869oksJYIae3SwwPycA Mf8w== X-Gm-Message-State: AODbwcAAfchse/D4HU0hUzKbpl5QOpXSCvQ58s1sqMjoiXIFvf3TEsRJ SK2xtNpRm2IiNIIL X-Received: by 10.55.52.13 with SMTP id b13mr291452qka.28.1494523329938; Thu, 11 May 2017 10:22:09 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([190.217.209.130]) by smtp.gmail.com with ESMTPSA id k10sm540946qke.3.2017.05.11.10.22.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 May 2017 10:22:09 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 14EBD2AC; Thu, 11 May 2017 14:22:07 -0300 (-03) Date: Thu, 11 May 2017 14:22:07 -0300 From: Alvaro Herrera To: Tom Lane Cc: Simon Riggs , Andrew Dunstan , Tomas Vondra , PostgreSQL-development , Dean Rasheed Subject: Re: WITH clause in CREATE STATISTICS Message-ID: <20170511172207.5erbtosbljaybaw5@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <17941.1494523147@sss.pgh.pa.us> User-Agent: NeoMutt/20170306-137-4415bd-dirty (1.8.0) X-Pg-Spam-Score: -2.6 (--) 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 Tom Lane wrote: > Have you thought further about the upthread suggestion to just borrow > SELECT's syntax lock stock and barrel? That is, it'd look something > like > > CREATE STATISTICS name [(list of stats types)] expression-list FROM ... > [ WHERE ... ] [ WITH (options) ] > > This would certainly support any FROM stuff we might want later. > Yeah, you'd need to reject any features you weren't supporting at > execution, but doing that would allow issuing a friendlier message than > "syntax error" anyway. Hmm, no, I hadn't looked at this angle. > If you don't have the cycles for that, I'd be willing to look into it. I'll give it a try today, and pass the baton if I'm unable to. -- Á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