Gavin Sherry <[EMAIL PROTECTED]> writes:
> Looks good. Another approach would be to put the existing code in a
> PG_TRY() block and catching the duplicate key violation.

Not really feasible from a code-structure point of view, I'm afraid.
Also there is the issue of cleaning up leaked resources (buffer pins
etc), which would probably require a subtransaction to be safe,
at which point it's not looking so fast anymore ...

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to