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: 41C990CB.4000601@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

Responses

Browse pgsql-hackers by date

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