Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w73Cc-004uZM-2M for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Mar 2026 03:22:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w73Cb-000vfL-0W for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Mar 2026 03:22:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w73Ca-000vfD-2r for pgsql-hackers@lists.postgresql.org; Mon, 30 Mar 2026 03:22:09 +0000 Received: from mail-qk1-x742.google.com ([2607:f8b0:4864:20::742]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w73CY-00000001vS2-38MF for pgsql-hackers@postgresql.org; Mon, 30 Mar 2026 03:22:09 +0000 Received: by mail-qk1-x742.google.com with SMTP id af79cd13be357-8cd7c372929so437454285a.0 for ; Sun, 29 Mar 2026 20:22:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774840926; cv=none; d=google.com; s=arc-20240605; b=WT/7yHg5fcZM2Soe6i69eUlYH9wfeRwOGp2IWsjNqdnOv8pxGL3rLZJNcn32unqITD IlOsfisjUrV5s5g0fizzX11/Jn6jRKKrtQFyNigM3CFSWRbR9rOn/qH6Ml9TlJne1yuH LF9yH867riGjGolUV/8NTIXUe7yuF9K4MuEwDibNgo3vXZz7OClI7wYJ+FXjgkd/a17U AHZ+bwhbtmgVVsfwo1GgX8h92JobKQU+7FZIQt27ReThLFrVLRD72xRa01A5imubNX84 CA8JBvgoQznDAatigBw4jGE54cfXzNMi+W+0lOFFjww7QDMarGQcOy6irOvalItwRu8N gatQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=kQxc2NhfIB1mLa+P+9la4HCY220TTKq2LBBpZORy+AY=; fh=iEkr8ko6NS7bZLM2tq+j+Hm15ejaTjnPtJhKgBZsRl8=; b=T0Wm/Ey05hv5dhsGt+YYPumoQ755xLbs1FSpPBEI4uHUndtQ25xTo7ok+SMrHJxV3S i0J4u7TpNTIEtmWHhHNbgDIxU/n1FZQpKyEDR52txx5D9NgKXzwzVZbve1cFkphuZ99A 8QVaDjw/S/fd1g6gGODLzVfHDHNlc12Zeb2yi7lXaFTmspB6PMKDCEXzIw3Ot8wuqjOB 0S5LX0lh+x8LRzxPMTuvQ3kYGASihwzlM9pooRB+OggmNzPiFryjX6kgKQjZziAhTEOs AnV/wAN8/FC58sN3w/qm9RWqVeApe9PZ1PJtgoUS8O9g18cknRmePWx6FnXinrQYr2O7 rOHQ==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774840926; x=1775445726; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=kQxc2NhfIB1mLa+P+9la4HCY220TTKq2LBBpZORy+AY=; b=N4aIHLNc+OmRpPgA/9ifiWz2mZnkoTsNx65g8eTjkHsj87o9VLOX1/aJN8wtLsby+y sZry4AfguOI07LNjt8V0bMgUZpoY+K90PCezQqWHZ8iup7rg5+yX9F9tOVHPvv/0q5yg /kerYnMNCk8+9GsZmgt5fIQQrZQD0Hw/GTwcAmkqAiY69hPrL4LGR09+cI5dcXErLkfC T076Iv5SUAYkuGldorJEvHOdpdPBsdrxFLF7BrTWpb3gc24CO1Q3NhHo6DL6323mykPi yxQNDRZIAV0mbvpJX1uQc6BTwHA+ychX8CIfNZ/7wqIfxRByfCDnR97ILYZ8oIEFswOQ dhtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774840926; x=1775445726; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=kQxc2NhfIB1mLa+P+9la4HCY220TTKq2LBBpZORy+AY=; b=c3eOO4Aho54Qu5d+YZp3DMt+dNNHV/4RSR+LWARrvUytW13NIrKat7i+7JraW2dONx Dz9sKhKU/QkX1XkZ2p6L7bqmZ9v4RpNVM5viJSQ/zX8SB512Ow+AwYTiFXwGCMd2TZFz qpZSo9noJO+jjg2mY1Wiv80joCfOzDvogHYKwkBHfUBzvvdjCQnSkbWVoxC3NAgPEz54 M4EGd+QPPNeYpd4ajHPZnBZcCG4vg64VHi64HjPJrdRt2cCt0JYSEr3xM3r+q1DhSS90 vCLoVoyJVA2Q9rf+GsHsFvtc7UzMooW2Tfejj1CeV7CpzbJrxXm8q9TB4gB1mZ9vpBt4 9POw== X-Forwarded-Encrypted: i=1; AJvYcCUs6DwM0+HCupFooJdZUFSVOciCL/yZq8ZB2xj12SE6SROSpEmtVA2rqmf2a24lVj5gpvsF8oVgHPiaAM+v@postgresql.org X-Gm-Message-State: AOJu0YxgNInqI7Phv9i8nKKeOL97KyPmbi9Gm9yoBDt7hfMg2XnZCS1w agYrvXqc/msFkufLpZ+sMpm97V227KFbdPHN1KhP7sHAlaIlhwcf7pKBt/U2qAntD/DTO+c4YP1 b2wq4H5YFIu4DYd3z1wetIPNNXP+Tk44= X-Gm-Gg: ATEYQzzFYrY0JGrZjpg3ybxT3BlCcyPFRF0vikiXJPB/RBtM8Vgtc1RH6LXIWP2/+Ug UIbB18kAii3/IsvggyueleF2NpOhzmCqHCgZ03DHF6OLK4Wia/TAUEV4u1sbXQDCNxj+YlhRJxl XbyOS25Ssx2pkKbuSH1NPDZrX0lOnYBEn473y5IDBjSTDilL5ovrGhZ0vOGNbSd3BSWp8v8U7NS BPhFp7IajtnjP5MhM+3CtC88IJGn7q0kfRPPA0RuFu2UK7iFonF+slNtwg8pqx5sIRssB8DPyye OJT3SnsxGRpts1n9a7YCuKyoY0NHYJZ+Xd2cRI8Pt/bN8JyvpX5awfsKngWcwIqLx5ExeiI3PcI lN7vUhULSSi5hEPDqynZr50D8mwI= X-Received: by 2002:a05:622a:3d0:b0:50b:48a6:6ba7 with SMTP id d75a77b69052e-50ba38bc180mr152249901cf.38.1774840925680; Sun, 29 Mar 2026 20:22:05 -0700 (PDT) MIME-Version: 1.0 References: <20260324203430.411331c59ca462457ec0aa8b@sraoss.co.jp> <20260325131548.4c9a0c8d05a422021b1ba76c@sraoss.co.jp> <20260327134637.957f51dafa2182a717a4cd78@sraoss.co.jp> <20260328150425.79219072e05f12e6b911b5e7@sraoss.co.jp> In-Reply-To: <20260328150425.79219072e05f12e6b911b5e7@sraoss.co.jp> From: John Naylor Date: Mon, 30 Mar 2026 10:21:54 +0700 X-Gm-Features: AQROBzBaGHriRo3EJ3Zwk0m9qedWYOH7fmh3cxa4nm-a_7iV2-gKzhgdENoyEbU Message-ID: Subject: Re: Adjust error message for CREATE STATISTICS to account for expressions To: Yugo Nagata Cc: Dean Rasheed , Michael Paquier , Pgsql Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, Mar 28, 2026 at 1:04=E2=80=AFPM Yugo Nagata w= rote: > > On Fri, 27 Mar 2026 09:50:07 +0000 > Dean Rasheed wrote: > > If we were to give more detail, it should probably be to point out > > that regular statistics will already be built for single columns, > > which is why single-column extended statistics would be redundant. So > > perhaps something like this: > > > > Error: cannot create extended statistics on a single column > > Detail: Univariate statistics are already built for each individual > > table column. > > That makes sense to me. > > Using an errdetail to explain the reason sounds reasonable. Works for me. > > > On Fri, 27 Mar 2026 07:45:37 +0700 > > > John Naylor wrote: > > > > Looking elsewhere in this file, however, I > > > > do see some messages with "cannot do X because ....", and I'd be mo= re > > > > motivated to turn those "because" phrases into errdetails. Did you also want to try tackling this while we're here? -- John Naylor Amazon Web Services