Re: BUG #17387: Working in PG13 but not in PGH14: array_agg(RECORD)

Pavel Stehule <pavel.stehule@gmail.com>

From: Pavel Stehule <pavel.stehule@gmail.com>
To: james.inform@pharmapp.de, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2022-01-28T20:19:57Z
Lists: pgsql-bugs
Hi


> Let's not discuss if such an sql makes sense.
> But question is: Why is PG14 giving an error while PG13 works?
>

Probably it is side effect of this patch

https://github.com/postgres/postgres/commit/9e38c2bb5093ceb0c04d6315ccd8975bd17add66#diff-e2a931f90073b784e341960c6fe1f48aaea4b5d57eb4388143534eec3863477b

The array_append, array_cat, array_prepend changed input types from any*
kind of polymorphic types to anycompatible* kind of polymorphic types

Regards

Pavel Stehule



> Cheers,
> James
>
>

Commits

  1. Fix failure to validate the result of select_common_type().

  2. Declare assorted array functions using anycompatible not anyelement.