On Sun, Feb 16, 2003 at 23:51:49 -0500,
  Greg Stark <[EMAIL PROTECTED]> wrote:
> Hm, odd, nobody mentioned this solution:
> If you don't have a primary key already, create a unique index on the
> combination you want to be unique. Then:
> . Try to insert the record
> . If you get a duplicate key error
>   then do update instead

I think this solution depends on records not being deleted. Otherwise
a record could be deleted between the insert attempt and the update attempt.

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

Reply via email to