Re: [Patch] Fix bounds check in trim_array() - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: [Patch] Fix bounds check in trim_array()
Date
Msg-id 20220728224618.GA412680@nathanxps13
Whole thread Raw
In response to [Patch] Fix bounds check in trim_array()  (Martin Kalcher <martin.kalcher@aboutsource.net>)
Responses Re: [Patch] Fix bounds check in trim_array()
List pgsql-hackers
On Mon, Jul 25, 2022 at 04:40:51PM +0200, Martin Kalcher wrote:
> +SELECT trim_array(ARRAY[]::int[], 1); -- fail
> +ERROR:  number of elements to trim must be between 0 and 0

Can we improve the error message?  Maybe it should look something like

    ERROR:  number of elements to trim must be 0

for this case.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: Mingw task for Cirrus CI
Next
From: Justin Kwan
Date:
Subject: Re: Making pg_rewind faster