Re: Cleaning up array_in()

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nikhil Benesch <nikhil.benesch@gmail.com>
Cc: Alexander Lakhin <exclusion@gmail.com>, Nathan Bossart <nathandbossart@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2023-06-05T02:38:28Z
Lists: pgsql-hackers
Nikhil Benesch <nikhil.benesch@gmail.com> writes:
> I took a look at 0002 because I attempted a similar but more surgical
> fix in [0].
> I spotted a few opportunities for further reducing state tracked by
> `ArrayCount`.

Wow, thanks for looking!  I've not run these suggestions to ground
(and won't have time for a few days), but they sound very good.

			regards, tom lane



Commits

  1. Don't specify number of dimensions in cases where we don't know it.

  2. Improve readability and error detection of array_in().

  3. Add trailing commas to enum definitions