Re: Thoughts about updateable views

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Thoughts about updateable views
Дата
Msg-id 41C990CB.4000601@archonet.com
обсуждение исходный текст
Ответ на Re: Thoughts about updateable views  (Yann Michel <yann-postgresql@spline.de>)
Ответы Re: Thoughts about updateable views
Список 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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Yann Michel
Дата:
Сообщение: Re: Thoughts about updateable views
Следующее
От: Greg Stark
Дата:
Сообщение: Re: RC2 and open issues