Re: MOVE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: PFC <lists(at)boutiquenumerique(dot)com>, Postgres general mailing list <pgsql-general(at)postgresql(dot)org>
Subject: Re: MOVE
Date: 2005-01-14 21:55:47
Message-ID: 26502.1105739747@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> Why not just do it in a single transaction? I don't think you need to
> use SERIALIZABLE at all, I think normal read-committed mode will do
> what you want, no?

> BEGIN;
> INSERT INTO archive (...) SELECT ... FROM active WHERE user_id = ...;
> DELETE FROM active WHERE user_id = ...;
> COMMIT;

No, that's exactly wrong: in read-committed mode the DELETE could delete
rows that were not seen by the SELECT. It would work in serializable
mode though.

regards, tom lane

In response to

  • Re: MOVE at 2005-01-14 21:28:57 from Martijn van Oosterhout

Browse pgsql-general by date

  From Date Subject
Next Message Frank D. Engel, Jr. 2005-01-14 21:59:57 Re: Parsing of backslash in statements via ODBC
Previous Message Tom Lane 2005-01-14 21:43:14 Re: Parsing of backslash in statements via ODBC

Browse pgsql-hackers by date

  From Date Subject
Next Message Benjamin Arai 2005-01-14 22:51:05 PostgreSQL Specification
Previous Message Kris Jurka 2005-01-14 21:54:02 Re: Time span conversion function