public inbox for [email protected]  
help / color / mirror / Atom feed
From: Chao Li <[email protected]>
To: Pgsql Hackers <[email protected]>
Cc: Michael Paquier <[email protected]>
Cc: Yugo Nagata <[email protected]>
Cc: John Naylor <[email protected]>
Cc: Dean Rasheed <[email protected]>
Subject: Re: Adjust error message for CREATE STATISTICS to account for expressions
Date: Mon, 30 Mar 2026 11:19:36 +0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <CANWCAZaZeX0omWNh_ZbD_JVujzYQdRUW8UZOQ4dWh9Sg7OcAow@mail.gmail.com>
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>



> On Mar 27, 2026, at 08:45, John Naylor <[email protected]> wrote:
> 
> On Fri, Mar 27, 2026 at 6:23 AM Michael Paquier <[email protected]> wrote:
>> -    errmsg("extended statistics require at least 2 columns")));
>> +    errmsg("extended statistics are not supported on a single column")));
>> 
>> Now our documentation also tells that the former message is not the
>> preferred project style (full sentences usually avoided in primary
>> messages):
>> https://www.postgresql.org/docs/devel/error-style-guide.html#ERROR-STYLE-GUIDE-GRAMMAR-PUNCTUATION
> 
> My reading of that is that hints/details need to be complete
> sentences, and primary messages don't need to be. 

+1


> From: Dean Rasheed <[email protected]>
> 
> 
> 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.

I like this version.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/









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], [email protected]
  Subject: Re: Adjust error message for CREATE STATISTICS to account for expressions
  In-Reply-To: <[email protected]>

* 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