Re: Concurrently updating an updatable view

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Concurrently updating an updatable view
Date: 2007-05-14 09:27:58
Message-ID: 46482B9E.3010805@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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)
> UPDATE 0
> ?

Ah, I re-read the example and I see what you mean now.

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 :(.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2007-05-14 10:01:12 Re: What is happening on buildfarm member baiji?
Previous Message ITAGAKI Takahiro 2007-05-14 09:04:58 Re: Automatic adjustment of bgwriter_lru_maxpages