Re: [Patch] Fix bounds check in trim_array()

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Martin Kalcher <martin(dot)kalcher(at)aboutsource(dot)net>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [Patch] Fix bounds check in trim_array()
Date: 2022-07-28 22:46:18
Message-ID: 20220728224618.GA412680@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Kwan 2022-07-28 22:46:28 Re: Making pg_rewind faster
Previous Message Justin Pryzby 2022-07-28 22:44:28 Re: Mingw task for Cirrus CI