Alban Hertroys wrote:
Pavan Deolasee wrote:
On 3/27/07, Tom Lane <[EMAIL PROTECTED]> wrote:

"Matthijs Melissen" <[EMAIL PROTECTED]> writes:
I am executing the following queries (id has a unique key):
1) begin;
1) delete from forum where id = 20;
1) insert into forum (id, name) values (20, 'test');
2) delete from forum where id = 20;
1) commit;

The problem is that process 2 gets the message 'DELETE 0'. I would
expect him to get the message 'DELETE 1'.

Not necessarily so. I'd expect only to see a successful delete in txn
2 if a record with id = 20 existed prior to the beginning of txn 1.

That is exactly the problem. Sorry for not being clear about that.
I get DELETE 0 even if a record with id=20 already exists before both transactions.

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to