public inbox for [email protected]  
help / color / mirror / Atom feed
From: John Naylor <[email protected]>
To: Yugo Nagata <[email protected]>
Cc: Pgsql Hackers <[email protected]>
Subject: Re: Adjust error message for CREATE STATISTICS to account for expressions
Date: Thu, 26 Mar 2026 16:22:07 +0700
Message-ID: <CANWCAZYjDSsvC6M6pas26ffbj-TZmXOHHC1-DwRM2LFa+qr3GQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<CANWCAZYdyQzCoAiq9kybHT2RcnC1CgrxbCpyxeV3+KZn2xj2UA@mail.gmail.com>
	<[email protected]>

On Wed, Mar 25, 2026 at 11:15 AM Yugo Nagata <[email protected]> wrote:
>
> On Wed, 25 Mar 2026 08:24:40 +0700
> John Naylor <[email protected]> wrote:

> > I'm ambivalent about this. Instead of trying to document all the
> > possible valid possibilities (which may get out of date again), maybe
> > we can say that it's not allowed on a single column?
>
> Thank you for the suggestion. I agree that this is a simpler approach,
> so I've attached a revised patch.

- errmsg("extended statistics require at least 2 columns")));
+ errmsg("extended statistics are not supported on a single column")));

I'd probably write this as "extended statistics on a single column are
not supported" (no need to send a new patch).

Any objections?

Also, I'm leaning towards not backpatching -- I figure a user that got
here by fat-fingering an expression is not likely to be too confused.

I looked in the feature thread and saw that this was actually raised
during development of the feature:

https://www.postgresql.org/message-id/CAEZATCU9uPo7JYdx4k0-ufXXZH8t7itodibUwCva%2Bs%2BAvAKcnw%40mail...

-- 
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]
  Subject: Re: Adjust error message for CREATE STATISTICS to account for expressions
  In-Reply-To: <CANWCAZYjDSsvC6M6pas26ffbj-TZmXOHHC1-DwRM2LFa+qr3GQ@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