Re: Adjust error message for CREATE STATISTICS to account for expressions
Yugo Nagata <nagata@sraoss.co.jp>
From: Yugo Nagata <nagata@sraoss.co.jp>
To: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: John Naylor <johncnaylorls@gmail.com>, Michael Paquier
<michael@paquier.xyz>, Pgsql Hackers <pgsql-hackers@postgresql.org>
Date: 2026-04-03T01:44:53Z
Lists: pgsql-hackers
Attachments
- v3-Adjust_error_message_for_CREATE_STATISTICS.patch (text/x-diff) patch v3
On Wed, 1 Apr 2026 17:19:16 +0100 Dean Rasheed <dean.a.rasheed@gmail.com> wrote: > On Tue, 31 Mar 2026 at 15:47, Yugo Nagata <nagata@sraoss.co.jp> wrote: > > > > Yes, that sounds good to me. > > > > In particular, the following suggestion from Dean Rasheed seems like a > > good approach: > > > > > Error: cannot create extended statistics on a single column > > > Detail: Univariate statistics are already built for each individual > > > table column > > I've pushed that change as part of the patch to support extended > statistics on virtual generated columns [1], since I felt that patch > already needed to change that error message. Thank you for handling this. > I didn't look more widely at other error messages in that file might > benefit from having separate errdetail text. I’ve attached a patch that also updates other error messages to move their reason parts into errdetail. Regards, Yugo Nagata -- Yugo Nagata <nagata@sraoss.co.jp>
Commits
-
Split CREATE STATISTICS error reasons out into errdetails
- 51098839cfb4 19 (unreleased) landed