Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 1475F9FB66D; Mon, 19 Mar 2007 17:41:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 11780-06; Mon, 19 Mar 2007 17:41:33 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from bay0-omc3-s11.bay0.hotmail.com (bay0-omc3-s11.bay0.hotmail.com [65.54.246.211]) by postgresql.org (Postfix) with ESMTP id 4A9EE9FB63C; Mon, 19 Mar 2007 17:41:36 -0300 (ADT) Received: from hotmail.com ([65.55.136.101]) by bay0-omc3-s11.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Mon, 19 Mar 2007 13:41:34 -0700 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Mon, 19 Mar 2007 13:41:34 -0700 Message-ID: Received: from 65.55.136.123 by by131fd.bay131.hotmail.msn.com with HTTP; Mon, 19 Mar 2007 20:41:31 GMT X-Originating-IP: [67.116.31.14] X-Originating-Email: [skarthi98@hotmail.com] X-Sender: skarthi98@hotmail.com In-Reply-To: From: "Karthikeyan Sundaram" To: pgsql-admin@postgresql.org, pgsql-sql@postgresql.org Subject: Re: create view with check option Date: Mon, 19 Mar 2007 13:41:31 -0700 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 19 Mar 2007 20:41:34.0522 (UTC) FILETIME=[FBB0B9A0:01C76A66] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/122 X-Sequence-Number: 24946 Hi everybody, I have implemented in a different way as advised in the manual. I thought this will be useful for everbody. We don't have check option in the view. Instead we can create a rule to make the view as insertable, updatable or delete. Here is the script. create table test_tbl (a int4, b int4, c varchar(30)); create or replace view test_vw as select * from test_tbl; create or replace rule test_rule_ins as on insert to test_vw do instead insert into test_tbl values (new.a, new.b, new.c); insert into test_vw (a, b) values (1,2); insert into test_vw (a, b) values (3,4); create or replace rule test_rule_upd as on update to test_vw do instead update test_tbl set a=new.a, b=new.b, c=new.c where a=new.a; update test_vw set c='good' where a=1; select * from test_vw; regards skarthi >From: "Karthikeyan Sundaram" >To: pgsql-admin@postgresql.org, pgsql-sql@postgresql.org >Subject: [ADMIN] create view with check option >Date: Sun, 18 Mar 2007 22:38:05 -0700 > >Hi Everybody, > > I have 2 versions of postgres 8.1.0 is my production version and 8.2.1 >is my development version. > > I am trying to create a view in my development version (8.2.3) > > create view chnl_vw as select * from channel with check option; > > I am getting an error message: > >[Error] Script lines: 1-1 -------------------------- >ERROR: WITH CHECK OPTION is not implemented >Line: 1 > > what does this mean? I looked at the 8.2.1 manual and found the create >view has check option. But it says before 8.2 those options are >unsupported. > > How can I make this command to work. > >Regards >skarthi > >_________________________________________________________________ >5.5%* 30 year fixed mortgage rate. Good credit refinance. Up to 5 free >quotes - *Terms >https://www2.nextag.com/goto.jsp?product=100000035&url=%2fst.jsp&tm=y&search=mortgage_text_links_88_h2a5d&s=4056&p=5117&disc=y&vers=910 > > >---------------------------(end of broadcast)--------------------------- >TIP 6: explain analyze is your friend _________________________________________________________________ i'm making a difference. Make every IM count for the cause of your choice. Join Now. http://clk.atdmt.com/MSN/go/msnnkwme0080000001msn/direct/01/?href=http://im.live.com/messenger/im/home/?source=hmtagline