Lincoln Yeoh <lyeoh@pop.jaring.my> writes:
> So I'll use "lock table" (this time in exclusive mode :) ), then select for
> update, then insert|update and leave the unique index to trigger an error
> when I forget to all that correctly, in which case it's definitely an error.
If you're holding an exclusive-mode lock then there's no need to do the
select FOR UPDATE; there can be no other lock holder.
regards, tom lane