Re: valid casts to anyarray

2023-09-28 Thread Philip Carlsen
> Per the comments for check_generic_type_consistency: > > * 2) All arguments declared ANYARRAY must have the same datatype, > *which must be a varlena array type. > This must be exactly the bit that I missed during my reading - thanks! > It has to not only have an element type, but hav

Re: valid casts to anyarray

2023-09-27 Thread Tom Lane
Philip Carlsen writes: > I've been down a rabbit hole today trying to understand what exactly makes > a type a valid candidate for an ANYARRAY function argument (e.g., something > you can 'unnest()'). Per the comments for check_generic_type_consistency: * 2) All arguments declared ANYARRAY must

Re: valid casts to anyarray

2023-09-27 Thread Laurenz Albe
On Tue, 2023-09-26 at 21:39 +0200, Philip Carlsen wrote: > I've been down a rabbit hole today trying to understand what exactly makes a > type > a valid candidate for an ANYARRAY function argument (e.g., something you can > 'unnest()'). > > My reading has led me across such functions as 'get_pro