public inbox for [email protected]  
help / color / mirror / Atom feed
From: John Naylor <[email protected]>
To: Yugo Nagata <[email protected]>
Cc: Dean Rasheed <[email protected]>
Cc: Michael Paquier <[email protected]>
Cc: Pgsql Hackers <[email protected]>
Subject: Re: Adjust error message for CREATE STATISTICS to account for expressions
Date: Mon, 30 Mar 2026 10:21:54 +0700
Message-ID: <CANWCAZaYOdb7p=xndzgDfvJ-0NN_HTyx54LVUX2i1Xs7cPSzbw@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<CANWCAZYdyQzCoAiq9kybHT2RcnC1CgrxbCpyxeV3+KZn2xj2UA@mail.gmail.com>
	<[email protected]>
	<CANWCAZYjDSsvC6M6pas26ffbj-TZmXOHHC1-DwRM2LFa+qr3GQ@mail.gmail.com>
	<[email protected]>
	<CANWCAZaZeX0omWNh_ZbD_JVujzYQdRUW8UZOQ4dWh9Sg7OcAow@mail.gmail.com>
	<[email protected]>
	<CAEZATCX2YDkbNZrACOpeLVQKgOhqTdON20XuTqwjWhSaVqbhUQ@mail.gmail.com>
	<[email protected]>

On Sat, Mar 28, 2026 at 1:04 PM Yugo Nagata <[email protected]> wrote:
>
> On Fri, 27 Mar 2026 09:50:07 +0000
> Dean Rasheed <[email protected]> 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 <[email protected]> wrote:
> > > > Looking elsewhere in this file, however, I
> > > > do see some messages with "cannot do X because ....", and I'd be more
> > > > 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





view thread (10+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Adjust error message for CREATE STATISTICS to account for expressions
  In-Reply-To: <CANWCAZaYOdb7p=xndzgDfvJ-0NN_HTyx54LVUX2i1Xs7cPSzbw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox