Re: Cleaning up array_in() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Cleaning up array_in()
Date
Msg-id 684482.1699459017@sss.pgh.pa.us
Whole thread Raw
In response to Re: Cleaning up array_in()  (Alexander Lakhin <exclusion@gmail.com>)
List pgsql-hackers
Alexander Lakhin <exclusion@gmail.com> writes:
> Thank you for the update! I haven't looked into the code, just did manual
> testing and rechecked commands given in the arrays documentation ([1]).
> Everything works correctly, except for one minor difference:
> INSERT INTO sal_emp
>      VALUES ('Bill',
>      '{10000, 10000, 10000, 10000}',
>      '{{"meeting", "lunch"}, {"meeting"}}');

> currently gives:
> ERROR:  malformed array literal: "{{"meeting", "lunch"}, {"meeting"}}"
> LINE 4:     '{{"meeting", "lunch"}, {"meeting"}}');
>              ^
> DETAIL:  Multidimensional arrays must have sub-arrays with matching dimensions.

> not
> ERROR:  multidimensional arrays must have array expressions with matching dimensions

Oh!  I had not realized we had actual documentation examples covering
this area.  Yeah, that doc needs to be updated to show the current
wording of the error.  Thanks for catching that.

            regards, tom lane



pgsql-hackers by date:

Previous
From: "Tristan Partin"
Date:
Subject: Re: meson documentation build open issues
Next
From: "Tristan Partin"
Date:
Subject: Re: Fix use of openssl.path() if openssl isn't found