[corrected typo, sorry]
And wouldn't a pure SQL-function solution be:to call an INSERT followed by an UPDATE in its bodyand ignoring the error? (don't know how ignore that errorbest though, so that I don't ignore other critical errors)