Re: Cleaning up array_in()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alexander Lakhin <exclusion(at)gmail(dot)com>
Cc: Nathan Bossart <nathandbossart(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Cleaning up array_in()
Date: 2023-05-09 03:06:47
Message-ID: 589737.1683601607@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alexander Lakhin <exclusion(at)gmail(dot)com> writes:
> The only thing that confused me, is the error message (it's not new, too):
> select '{{{{{{{{{{1}}}}}}}}}}'::int[];
> or even:
> select '{{{{{{{{{{'::int[];
> ERROR:  number of array dimensions (7) exceeds the maximum allowed (6)

Yeah, I didn't touch that, but it's pretty bogus because the first
number will always be "7" even if you wrote more than 7 left braces,
since the code errors out immediately upon finding that it's seen
too many braces.

The equivalent message in the PLs just says "number of array dimensions
exceeds the maximum allowed (6)". I'm inclined to do likewise in
array_in, but didn't touch it here.

> Beside that, I would like to note the following error text changes
> (all of these are feasible, I think):

I'll look into whether we can improve those, unless you had a patch
in mind already?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Guo 2023-05-09 03:07:47 Re: Improve list manipulation in several places
Previous Message Alexander Lakhin 2023-05-09 03:00:00 Re: Cleaning up array_in()