Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp> writes:
> I wasn't looking for safety so much as avoiding the insert if possible.
> ...
> The above would reduce (but not eliminate) the number attempts to insert
> duplicates and as such reduce the number of log error entries.
Fair enough, it would do that. But you still need the surrounding retry
logic to cope when a collision does happen.
regards, tom lane