Re: BUG #17912: Invalid memory access when converting plpython' array containing empty array

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

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Lakhin <exclusion@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Date: 2023-05-04T15:26:58Z
Lists: pgsql-bugs
Alexander Lakhin <exclusion@gmail.com> writes:
> I continue watching the array handling bugs dancing Sirtaki too. Now it's
> another asymmetry:
> select '{{1},{{2}}}'::int[];
>   {{{1}},{{2}}}
> but:
> select '{{{1}},{2}}'::int[];
>   {}

For the sake of the archives --- this issue in the core code
is being tracked at

https://www.postgresql.org/message-id/2794005.1683042087%40sss.pgh.pa.us

I think all the reported issues in plperl and plpython are resolved now.

			regards, tom lane



Commits

  1. Tighten array dimensionality checks in Python -> SQL array conversion.

  2. Tighten array dimensionality checks in Perl -> SQL array conversion.

  3. Handle zero-length sublist correctly in Python -> SQL array conversion.