On Sun, Dec 28, 2008 at 9:29 AM, Bernd Helmle <be...@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, it is 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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to