Re: Do we need a TODO? (was Re: [HACKERS] Concurrently updating an updatable view)

2007-05-28 Thread Bruce Momjian
Added to TODO: * Fix self-referential UPDATEs seeing inconsistent row versions in read-committed mode http://archives.postgresql.org/pgsql-hackers/2007-05/msg00507.php --- Richard Huxton wrote: > Florian G. Pflug wrot

Do we need a TODO? (was Re: [HACKERS] Concurrently updating an updatable view)

2007-05-22 Thread Richard Huxton
Florian G. Pflug wrote: Is there consensus what the correct behaviour should be for self-referential updates in read-committed mode? Does the SQL Spec have anything to say about this? This seems to have gone all quiet. Do we need a TODO to keep a note of it? Just "correct behaviour for self-r

Re: [HACKERS] Concurrently updating an updatable view

2007-05-15 Thread Florian G. Pflug
Richard Huxton wrote: Hiroshi Inoue wrote: Florian G. Pflug wrote: I think there should be a big, fat warning that self-referential updates have highly non-obvious behaviour in read-committed mode, and should be avoided. It seems pretty difficult for PostgreSQL rule system to avoid such kin

Re: [HACKERS] Concurrently updating an updatable view

2007-05-15 Thread Richard Huxton
Hiroshi Inoue wrote: Florian G. Pflug wrote: I think there should be a big, fat warning that self-referential updates have highly non-obvious behaviour in read-committed mode, and should be avoided. It seems pretty difficult for PostgreSQL rule system to avoid such kind of updates. I'm suspi

Re: [HACKERS] Concurrently updating an updatable view

2007-05-14 Thread Hiroshi Inoue
Florian G. Pflug wrote: Richard Huxton wrote: Richard Huxton wrote: Heikki Linnakangas wrote: Bit more than just normal rule confusion I'd say. Try the following two statements in parallel (assuming you've just run the previous): UPDATE test SET dt='c'; UPDATE test SET dt='x' FROM test t

Re: [HACKERS] Concurrently updating an updatable view

2007-05-14 Thread Richard Huxton
Hiroshi Inoue wrote: Richard Huxton wrote: Heikki Linnakangas wrote: The problem is that the new tuple version is checked only against the condition in the update rule, id=OLD.id, but not the condition in the original update-claus, dt='a'. Yeah, that's confusing :(. Bit more than just norm

Re: [HACKERS] Concurrently updating an updatable view

2007-05-14 Thread Hiroshi Inoue
Richard Huxton wrote: Heikki Linnakangas wrote: The problem is that the new tuple version is checked only against the condition in the update rule, id=OLD.id, but not the condition in the original update-claus, dt='a'. Yeah, that's confusing :(. Bit more than just normal rule confusion I'd

Re: [HACKERS] Concurrently updating an updatable view

2007-05-14 Thread Florian G. Pflug
Richard Huxton wrote: Richard Huxton wrote: Heikki Linnakangas wrote: The problem is that the new tuple version is checked only against the condition in the update rule, id=OLD.id, but not the condition in the original update-claus, dt='a'. Yeah, that's confusing :(. Bit more than just nor

Re: [HACKERS] Concurrently updating an updatable view

2007-05-14 Thread Richard Huxton
Richard Huxton wrote: Heikki Linnakangas wrote: The problem is that the new tuple version is checked only against the condition in the update rule, id=OLD.id, but not the condition in the original update-claus, dt='a'. Yeah, that's confusing :(. Bit more than just normal rule confusion I'd

Re: [HACKERS] Concurrently updating an updatable view

2007-05-14 Thread Richard Huxton
Heikki Linnakangas wrote: The problem is that the new tuple version is checked only against the condition in the update rule, id=OLD.id, but not the condition in the original update-claus, dt='a'. Yeah, that's confusing :(. Bit more than just normal rule confusion I'd say. Try the following

Re: [HACKERS] Concurrently updating an updatable view

2007-05-14 Thread Heikki Linnakangas
Hiroshi Inoue wrote: Heikki Linnakangas wrote: Hiroshi Inoue wrote: Concurrently updating an updatable view seems to cause an unexpected result. Is it a known issue? Looks right to me. What did you expect? Shouldn't the last response (session-2) UPDATE 1 be (seesion-2)

Re: [HACKERS] Concurrently updating an updatable view

2007-05-14 Thread Hiroshi Inoue
Heikki Linnakangas wrote: > Hiroshi Inoue wrote: >> Concurrently updating an updatable view seems to cause >> an unexpected result. Is it a known issue? > > Looks right to me. What did you expect? Shouldn't the last response (session-2) UPDATE 1 be (seesion-2) UPDAT

Re: [HACKERS] Concurrently updating an updatable view

2007-05-14 Thread Heikki Linnakangas
Hiroshi Inoue wrote: > Concurrently updating an updatable view seems to cause > an unexpected result. Is it a known issue? Looks right to me. What did you expect? -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)-

[HACKERS] Concurrently updating an updatable view

2007-05-13 Thread Hiroshi Inoue
Hi developers, Concurrently updating an updatable view seems to cause an unexpected result. Is it a known issue? => select version(); version --- PostgreSQL 8.2.1 on i686-pc-mingw32, compiled