Bruce Momjian <br...@momjian.us> writes: > On Sat, Apr 27, 2019 at 08:26:57PM +0000, PG Doc comments form wrote: >> Try, for example. >> >> SELECT COALESCE(NULL, '12', 3, 1, 1); -- OK! >> SELECT COALESCE(NULL, '12.2', 3.2, '1', 1.1); -- OK! >> SELECT COALESCE(NULL, '1d2', 3, 1, 1); -- error >> SELECT COALESCE(NULL, '12', 3, '1d', 1); -- cast error
> What is wrong about the existing description? That it doesn't mention > mixing data types? The place where that behavior is described is https://www.postgresql.org/docs/current/typeconv-union-case.html It doesn't mention COALESCE explicitly, though ... and I imagine digging in the code for coerce_to_common_type callers might find some other cases that aren't listed there. regards, tom lane