Re: peer review: recipe for solving SELECT/INSERT/UPDATE race condition
- From: stuart.cooper@xxxxxxxxx (Stuart Cooper)
- Date: Tue, 22 Aug 2006 10:56:04 +1000
Sometimes it's desirable to first to a SELECT to see if a row exists,
and then INSERT if it doesn't already, or UPDATE if it does.
MySQL's got a really handy 'REPLACE INTO' for just this circumstance,
some have suggested that PostgreSQL should support this in future.
Your solution looks good.
Stuart.
.
- Follow-Ups:
- Re: peer review: recipe for solving SELECT/INSERT/UPDATE race condition
- From: Mark Stosberg
- Re: peer review: recipe for solving SELECT/INSERT/UPDATE race condition
- References:
- peer review: recipe for solving SELECT/INSERT/UPDATE race condition
- From: Mark Stosberg
- peer review: recipe for solving SELECT/INSERT/UPDATE race condition
- Prev by Date: peer review: recipe for solving SELECT/INSERT/UPDATE race condition
- Next by Date: Re: queries not getting executed?
- Previous by thread: peer review: recipe for solving SELECT/INSERT/UPDATE race condition
- Next by thread: Re: peer review: recipe for solving SELECT/INSERT/UPDATE race condition
- Index(es):