Skip site navigation (1) Skip section navigation (2)

Re: Thoughts about updateable views

From: Richard Huxton <dev(at)archonet(dot)com>
To: Yann Michel <yann-postgresql(at)spline(dot)de>
Cc: Jaime Casanova <systemguards(at)yahoo(dot)com>,pgsql-hackers(at)postgresql(dot)org
Subject: Re: Thoughts about updateable views
Date: 2004-12-22 15:20:43
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Yann Michel wrote:
> Hi,
> On Wed, Dec 22, 2004 at 09:41:40AM +0000, Richard Huxton wrote:
>>UNION etc doesn't necessarily mean you can't update, so long as the 
>>underlying table/key can be identified.
> I think you mean UNION ALL, i.e. the set addition, don't you?
> Otherwise UNION (wothout ALL) is kind of a aggregation due to it only
> adds a row once to the resulting set wheter it is found twice or not.
> Therefore any updates are not possible.

Not if you can identify the underlying table(s) and key(s). If the UNION 
hides that information, then you are correct. Imagine the case where you 
were running a calendar system and had people_invited unioned with 
rooms_booked - you could in theory alter the name on both.

   Richard Huxton
   Archonet Ltd

In response to


pgsql-hackers by date

Next:From: Greg StarkDate: 2004-12-22 16:04:24
Subject: Re: RC2 and open issues
Previous:From: Yann MichelDate: 2004-12-22 13:01:49
Subject: Re: Thoughts about updateable views

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group