another question i met during reviewing

Started by Unicronabout 17 years ago2 messages
#1Unicron
ssmei_2000@yahoo.com

Here is another example for testing "Automatic update view", seems that "check option" doesn't work, i am not sure any other things i need to do, or it is a bug for the patch, anyone give me a help?

Thanks

postgres=# create view old_customer as
postgres-# select name,
postgres-#        age,
postgres-#        city
postgres-# from customer
postgres-# where age > 30
postgres-# with check option;
NOTICE:  CREATE VIEW will create implicit INSERT/UPDATE/DELETE rules
postgres=# insert into old_customer values ('Kalley', 43, 'Kava');
INSERT 0 1
postgres=# insert into old_customer values ('Kalley', 21, 'loppe');
INSERT 0 1
postgres=# select * from customer;
 Jim                  |  25 | WDC                
 Kim                  |  34 | Pet                
 Lottery              |  75 | Polley             
 Kalley               |  43 | Kava               
 Kalley               |  21 | loppe              
postgres=# select * from old_customer;
 Kim                  |  34 | Pet                
 Lottery              |  75 | Polley             
 Kalley               |  43 | Kava               
postgres=# insert into old_customer values ('Mathaa', 20, 'loaa');
INSERT 0 1
postgres=# select * from old_customer;
 Kim                  |  34 | Pet                
 Lottery              |  75 | Polley             
 Kalley               |  43 | Kava  

#2Jaime Casanova
jcasanov@systemguards.com.ec
In reply to: Unicron (#1)
Re: another question i met during reviewing

On Mon, Nov 10, 2008 at 10:40 PM, Unicron <ssmei_2000@yahoo.com> wrote:

Here is another example for testing "Automatic update view", seems that
"check option" doesn't work, i am not sure any other things i need to do, or
it is a bug for the patch, anyone give me a help?

actually that is intentional, there was a lot of problems in original
implementation of CHECK OPTION :)
http://archives.postgresql.org/message-id/2849137C693B65CC8E86411C@imhotep.credativ.de

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