Is there a max function for timestamps (with or without timezone)?
When I call max on two timestamps, I get an error : select max(now()::timestamp, to_timestamp('2021-01-01', 'YYYY-MM-DD')::timestamp); -- ERROR: function max(timestamp without time zone, timestamp without time zone) does not exist My actual usage would be in an upsert query, where I would like to write : INSERT ... ON CONFLICT (pk) DO UPDATE SET ts = max(tab