Re: Thoughts about updateable views

Поиск
Список
Период
Сортировка
От Bernd Helmle
Тема Re: Thoughts about updateable views
Дата
Msg-id 110580000.1079997335@sparkey.oopsware.intra
обсуждение исходный текст
Ответ на Re: Thoughts about updateable views  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
--On Montag, März 22, 2004 18:00:55 -0500 Tom Lane <tgl@sss.pgh.pa.us>
wrote:

>
> That sounds bogus to me.  It's obvious that columns not present in the
> view can't be updated through the view --- you simply do not have a way
> to name them, so how could you affect them?
>
> What the spec actually says, if I'm reading it correctly, is that CHECK
> OPTION forbids you from using the view to insert/update *rows* that
> would not appear in the view.  For example given
>
>     CREATE VIEW v AS SELECT * FROM t WHERE flag != 42
>     WITH CHECK OPTION;
>
> you could see the "flag" column in the view, and could set it on insert
> or update --- so long as you didn't try to set it to 42.  That would
> mean that the result row was invisible in the view, which is what CHECK
> OPTION forbids.
>

Ah, okay. I should have read this more carefully. Thanks for the
clarification. No it
makes sense....


--  Bernd


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Thoughts about updateable views
Следующее
От: Joe Conway
Дата:
Сообщение: Re: pg_autovacuum next steps