Re: Thoughts about updateable views

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Thoughts about updateable views
Дата
Msg-id 8228.1079990254@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Thoughts about updateable views  (Bernd Helmle <mailings@oopsware.de>)
Ответы Re: Thoughts about updateable views  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Thoughts about updateable views  (Bernd Helmle <mailings@oopsware.de>)
Список pgsql-hackers
Bernd Helmle <mailings@oopsware.de> writes:
> a) Definition of an updateable view?

> The first thing what i thought about was, what defines a updateable view. 

The SQL spec clearly defines the requirements for a view to be
updateable.  It seems sufficient to me to handle the cases required by
the spec.

> b) The creation of an automatic INSERT/UPDATE or DELETE Rule had to be done 
> with
> the creation of the SELECT Rule. I understand how PostgreSQL handles views 
> with its Rule
> System, but what happens when no appropiate Rule can be created?

You don't create it.  This corresponds to the view not being updateable.
AFAICS the spec expects CREATE VIEW to create both kinds of view without
the implementation making any particular comment about it.

We might need to mark automatically created rules as such, and be
prepared to drop them if the user then defines a manually-created rule.
Otherwise we will have backwards-compatibility problems with existing
databases.
        regards, tom lane


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

Предыдущее
От: Gavin Sherry
Дата:
Сообщение: Re: pg_autovacuum next steps
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_autovacuum next steps