pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Martin Kalcher <martin.kalcher@aboutsource.net>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: [Patch] Fix bounds check in trim_array()
Date: Thu, 28 Jul 2022 15:46:18 -0700
Message-ID: <20220728224618.GA412680@nathanxps13> (raw)
In-Reply-To: <baaeb413-b8a8-4656-5757-ef347e5ec11f@aboutsource.net>
References: <baaeb413-b8a8-4656-5757-ef347e5ec11f@aboutsource.net>

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





view thread (3+ messages)  latest in thread

Message-ID: <20220728224618.GA412680@nathanxps13>
Permalink:  ../20220728224618.GA412680@nathanxps13/
Also on:    postgresql.org/message-id/20220728224618.GA412680@nathanxps13

 · 

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: pgsql-hackers@postgresql.org
  Cc: nathandbossart@gmail.com, martin.kalcher@aboutsource.net, pgsql-hackers@lists.postgresql.org
  Subject: Re: [Patch] Fix bounds check in trim_array()
  In-Reply-To: <20220728224618.GA412680@nathanxps13>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox