On 25/01/16 08:48, rwestlun(at)gmail(dot)com wrote:
> I believe postgres should be returning "UPDATE" here instead of "INSERT"
> because I see no way to know which operation took place.
That seems a bit short-sighted.  What should happen if one row was added 
and one updated?
FWIW, I would've expected to be able to do  RETURNING excluded.foo 
which would have been NULL in case of INSERT, and the value from the 
updated tuple otherwise.  But that doesn't seem to work.
.m