> On 25 Jun 2020, at 16:32, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> The reason for this might be a little more obvious if you wrote the
> implicit row constructor explicitly, ie
>
> SELECT COUNT(DISTINCT ROW(testtable.column2, 'blub')) FROM public.testtable;
That's a good point, that's a clearer explanation.
> Perhaps there's room to argue that we should allow 'unknown' to decay to
> 'text' automatically in this context, but I'm not in a big hurry to do
> that. It seems better to make people be explicit about which datatype
> they intend inside such complex, infrequently-used constructs.
Agreed, it sounds like something that will just work in most cases but run the
risk of introducing subtle bugs in the cases where it doesn't.
cheers ./daniel