"Carlo Stonebanks" <stonec(dot)register(at)sympatico(dot)ca> writes:
> Ok, I tried to be clever and I wrote code to avoid inserting duplicate data.
> The calling function has a try-catch to recover from this, but I am curious
> as to why it failed:
There's nothing obviously wrong with that, which means the issue is in
something you didn't show us. Care to assemble a self-contained
example?
regards, tom lane