Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mFRT6-0002xw-Ri for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Aug 2021 01:31:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mFRT4-0004Wk-IS for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Aug 2021 01:31:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mFRT3-0004Wb-LJ for pgsql-hackers@lists.postgresql.org; Mon, 16 Aug 2021 01:31:09 +0000 Received: from mail-il1-x12c.google.com ([2607:f8b0:4864:20::12c]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mFRSy-0004XD-B9 for pgsql-hackers@postgresql.org; Mon, 16 Aug 2021 01:31:08 +0000 Received: by mail-il1-x12c.google.com with SMTP id j18so16917167ile.8 for ; Sun, 15 Aug 2021 18:31:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=n1pnRhyiueHpwyaqzc3i5RXI6GoR5nMv/OxIh6puzjI=; b=nl/lZ6b49x+jL/+r+zVmOvs8lRirG35sbKmL1fZqX7NcsYbD2PNyLO0sleEAV9/tKK PFvD2e3vJ8Ci0R1z+SIVLWB4FNOJLajYqWhYkVD26X/qwxiZFRA4xNywRbRipUT+3uWz L9s0YfclSbRMo8tLXxLQ1qHkJ6E0OQNtp6hEXbj3x0G1oTamNntlvVp5KWmGXQivNAc1 RpigLORV275BdyLLTAHCx7leLvyR/EAB324QO8SsDwUpc+9KnAiFs0AdN3tQ6DKc+Ybx rKv2Vx3u4B3d8/PYefHnC6HyPU3RGAi8aoVYo+I7smaUfG5frho3hnMG1cijMxV5tVXN 9uWQ== 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=n1pnRhyiueHpwyaqzc3i5RXI6GoR5nMv/OxIh6puzjI=; b=ohNjQcmvc5UlDVB/Y1bLkTWM07WyegmNoKoStQOIATblz+KLqf7fahG2fzYAiH/0CG dnFqWhj1bS4oKn3uacP8LNPAB29kmcgryPFJXESdaN/hj2TN8TTKUCUHGylXkBwRrwid lY53Wh3ZuYEeuere06Koq9TUIBRhyk6RQ9rmmYiQ+jW8rPDSRUNTLvjfJV8r/0r1x4Bn 9z2ILI+VEAqydrNpDwHDDr4V5jx4Q0i46/XE+tM3zryfGgioOhlmn+cWoZCSSblJ624r 0U1Ybuy5LtyxraHpOBXVVx17X8SvLvpAXmfof9qrVBfNsxnRlOq3pfvgCypiP2zg4/cD 2Eww== X-Gm-Message-State: AOAM533ravhUMllsvwXPFZ34C2N02jK41QOQ6ICK9G2KUz2dm/2DZO5B kfqtUH7bOp8dv4Vncc3ClP2Dxg== X-Google-Smtp-Source: ABdhPJwn7P58tTb4dkx6JwBAgD29VPGeMmACTmqynNAVWeKWDeCa2rp0+jJR0BOPmwS/eYnzTK7Nng== X-Received: by 2002:a05:6e02:78d:: with SMTP id q13mr10065866ils.262.1629077463096; Sun, 15 Aug 2021 18:31:03 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id i11sm4821915ioj.9.2021.08.15.18.31.02 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Aug 2021 18:31:02 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 83571800A3C; Sun, 15 Aug 2021 20:31:01 -0500 (CDT) Date: Sun, 15 Aug 2021 20:31:01 -0500 From: Justin Pryzby To: Tomas Vondra Cc: Dean Rasheed , pgsql-hackers@postgresql.org Subject: Re: PoC/WIP: Extended statistics on expressions Message-ID: <20210816013101.GR10479@telsasoft.com> References: <2f2a3b3b-93e4-723f-144e-bc21f10d6b61@enterprisedb.com> <20210118045331.GF8560@telsasoft.com> <3f20da4d-89dc-0912-98d2-b6f0ef06c87f@enterprisedb.com> <20210122022958.GC27167@telsasoft.com> <20210122040101.GF27167@telsasoft.com> <04b100f9-201b-0bc8-c613-0f918451b599@enterprisedb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <04b100f9-201b-0bc8-c613-0f918451b599@enterprisedb.com> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 1/22/21 5:01 AM, Justin Pryzby wrote: > > In any case, why are there so many parentheses ? On Fri, Jan 22, 2021 at 02:09:04PM +0100, Tomas Vondra wrote: > That's a bug in pg_get_statisticsobj_worker, probably. It shouldn't be > adding extra parentheses, on top of what deparse_expression_pretty does. > Will fix. The extra parens are still here - is it intended ? postgres=# CREATE STATISTICS s ON i, (1+i), (2+i) FROM t; CREATE STATISTICS postgres=# \d t Table "public.t" Column | Type | Collation | Nullable | Default --------+---------+-----------+----------+--------- i | integer | | | Statistics objects: "public"."s" ON i, ((1 + i)), ((2 + i)) FROM t -- Justin