pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedcreate view with check option
6+ messages / 4 participants
[nested] [flat]
* create view with check option
@ 2007-03-19 05:38 Karthikeyan Sundaram <skarthi98@hotmail.com>
2007-03-19 05:58 ` Re: [SQL] create view with check option Tom Lane <tgl@sss.pgh.pa.us>
2007-03-19 17:34 ` Re: create view with check option Gaetano Mendola <mendola@bigfoot.com>
2007-03-19 20:41 ` Re: create view with check option Karthikeyan Sundaram <skarthi98@hotmail.com>
0 siblings, 3 replies; 6+ messages in thread
From: Karthikeyan Sundaram @ 2007-03-19 05:38 UTC (permalink / raw)
To: pgsql-admin@postgresql.org; pgsql-sql
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_te...
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [SQL] create view with check option
2007-03-19 05:38 create view with check option Karthikeyan Sundaram <skarthi98@hotmail.com>
@ 2007-03-19 05:58 ` Tom Lane <tgl@sss.pgh.pa.us>
2007-03-19 07:29 ` Re: [SQL] create view with check option hubert depesz lubaczewski <depesz@gmail.com>
2 siblings, 1 reply; 6+ messages in thread
From: Tom Lane @ 2007-03-19 05:58 UTC (permalink / raw)
To: Karthikeyan Sundaram <skarthi98@hotmail.com>; +Cc: pgsql-admin@postgresql.org; pgsql-sql
"Karthikeyan Sundaram" <skarthi98@hotmail.com> writes:
> I am getting an error message:
> ERROR: WITH CHECK OPTION is not implemented
> what does this mean?
It seems perfectly clear to me ...
regards, tom lane
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [SQL] create view with check option
2007-03-19 05:38 create view with check option Karthikeyan Sundaram <skarthi98@hotmail.com>
2007-03-19 05:58 ` Re: [SQL] create view with check option Tom Lane <tgl@sss.pgh.pa.us>
@ 2007-03-19 07:29 ` hubert depesz lubaczewski <depesz@gmail.com>
2007-03-19 14:16 ` Re: [SQL] create view with check option Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 6+ messages in thread
From: hubert depesz lubaczewski @ 2007-03-19 07:29 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin@postgresql.org; pgsql-sql
On 3/19/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Karthikeyan Sundaram" <skarthi98@hotmail.com> writes:
> > I am getting an error message:
> > ERROR: WITH CHECK OPTION is not implemented
> > what does this mean?
> It seems perfectly clear to me ...
errors is clear, but maybe the information about check option should
be removed from docs to 8.2? it is still not there in latest builds of
8.3devel.
depesz
--
http://www.depesz.com/ - nowy, lepszy depesz
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [SQL] create view with check option
2007-03-19 05:38 create view with check option Karthikeyan Sundaram <skarthi98@hotmail.com>
2007-03-19 05:58 ` Re: [SQL] create view with check option Tom Lane <tgl@sss.pgh.pa.us>
2007-03-19 07:29 ` Re: [SQL] create view with check option hubert depesz lubaczewski <depesz@gmail.com>
@ 2007-03-19 14:16 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 6+ messages in thread
From: Tom Lane @ 2007-03-19 14:16 UTC (permalink / raw)
To: hubert depesz lubaczewski <depesz@gmail.com>; +Cc: pgsql-admin@postgresql.org; pgsql-sql
"hubert depesz lubaczewski" <depesz@gmail.com> writes:
> On 3/19/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> ERROR: WITH CHECK OPTION is not implemented
>> It seems perfectly clear to me ...
> errors is clear, but maybe the information about check option should
> be removed from docs to 8.2?
There is no place in the 8.2 docs that claims it is implemented.
regards, tom lane
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: create view with check option
2007-03-19 05:38 create view with check option Karthikeyan Sundaram <skarthi98@hotmail.com>
@ 2007-03-19 17:34 ` Gaetano Mendola <mendola@bigfoot.com>
2 siblings, 0 replies; 6+ messages in thread
From: Gaetano Mendola @ 2007-03-19 17:34 UTC (permalink / raw)
To: Karthikeyan Sundaram <skarthi98@hotmail.com>
Karthikeyan Sundaram wrote:
> 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.
Why are you trying to declare a view "with check option" using a 8.2 engine?
Can you show us the part of manual that say you can use that syntax?
I see:
CREATE [ OR REPLACE ] [ TEMP | TEMPORARY ] VIEW name [ ( column_name [, ...] ) ]
AS query
Regards
Gaetano Mendola
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: create view with check option
2007-03-19 05:38 create view with check option Karthikeyan Sundaram <skarthi98@hotmail.com>
@ 2007-03-19 20:41 ` Karthikeyan Sundaram <skarthi98@hotmail.com>
2 siblings, 0 replies; 6+ messages in thread
From: Karthikeyan Sundaram @ 2007-03-19 20:41 UTC (permalink / raw)
To: pgsql-admin@postgresql.org; pgsql-sql
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" <skarthi98@hotmail.com>
>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_te...
>
>
>---------------------------(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/ho...
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2007-03-19 20:41 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-03-19 05:38 create view with check option Karthikeyan Sundaram <skarthi98@hotmail.com>
2007-03-19 05:58 ` Tom Lane <tgl@sss.pgh.pa.us>
2007-03-19 07:29 ` hubert depesz lubaczewski <depesz@gmail.com>
2007-03-19 14:16 ` Tom Lane <tgl@sss.pgh.pa.us>
2007-03-19 17:34 ` Gaetano Mendola <mendola@bigfoot.com>
2007-03-19 20:41 ` Karthikeyan Sundaram <skarthi98@hotmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox