Adjust error message for CREATE STATISTICS to account for expressions - Mailing list pgsql-hackers

From Yugo Nagata
Subject Adjust error message for CREATE STATISTICS to account for expressions
Date
Msg-id 20260324203430.411331c59ca462457ec0aa8b@sraoss.co.jp
Whole thread Raw
Responses Re: Adjust error message for CREATE STATISTICS to account for expressions
List pgsql-hackers
Hi,

I've attached a patch to adjust the error message for CREATE STATISTICS
to account for expressions. 

Previously, when attempting to create extended statistics on a single column,
the following error is raised.

 ERROR:  extended statistics require at least 2 columns

However, this message assumed only columns. In reality, an expression on a
single column is also allowed, so two columns are not necessarily required.
Thgis patch updates the message to: 

 ERROR:  extended statistics require at least 2 columns or an expression

Regards,
Yugo Nagata

-- 
Yugo Nagata <nagata@sraoss.co.jp>

Attachment

pgsql-hackers by date:

Previous
From: Xuneng Zhou
Date:
Subject: Re: log_checkpoints: count WAL segment creations from all processes
Next
From: Dean Rasheed
Date:
Subject: Re: Allow to collect statistics on virtual generated columns