Re: WIP: Automatic view update rules

Поиск
Список
Период
Сортировка
От Jaime Casanova
Тема Re: WIP: Automatic view update rules
Дата
Msg-id 3073cc9b0812281330l1590b515x2b1aecec662630@mail.gmail.com
обсуждение исходный текст
Ответ на Re: WIP: Automatic view update rules  ("Bernd Helmle" <bernd@oopsware.de>)
Ответы Re: WIP: Automatic view update rules  ("Bernd Helmle" <bernd@oopsware.de>)
Список pgsql-hackers
On Sun, Dec 28, 2008 at 9:29 AM, Bernd Helmle <bernd@oopsware.de> wrote:
>
> Yes, it seems we have to check for target lists having negative attnums in
> checkTree(). Another solution would be to simply ignore those columns
> (extract them from the target list and include all updatable columns
> only).
>

i would say check for negative attnums and deny that view to be
updateable because of SQL92 says in 11.19 <view definition> syntax
rule 6:
"""        6) If the <query expression> is updatable, then the viewed table is           an updatable table. Otherwise,
itis a read-only table. 
"""
wich i understand as deny updatability in any view that constains non
updateable <query expression> in the target list

>> 2) Another less important bug, the WITH CHECK OPTION is accepted even
>> when that functionality is not implemented.
>>
>> updatable_views=# create or replace view v2 as select * from foo where
>> id < 10 with check option;
>> NOTICE:  CREATE VIEW will create implicit INSERT/UPDATE/DELETE rules
>> CREATE VIEW
>>
>
> What do we want in this case? We can throw an error telling that CHECK
> OPTION isn't supported yet or simply issueing a warning.
>

yes. if we didn't do that we will be against spec. syntax rule 12
(again in 11.19 <view definition> ) says:
"""        12)If WITH CHECK OPTION is specified, then the viewed table shall           be updatable.

"""

--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157


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

Предыдущее
От: "David Rowley"
Дата:
Сообщение: Re: TODO items for window functions
Следующее
От: Tom Lane
Дата:
Сообщение: Re: TODO items for window functions