Re: [SQL] DO INSTEAD in rule

2004-01-04 Thread Tatsuo Ishii
> Tatsuo Ishii <[EMAIL PROTECTED]> writes: > > In the last SELECT I exepcted j = 0, rather than j = 1 since I use DO > > INSTEAD in the rule and the default value for j is 0. Am I missing > > something? > > > CREATE rule t1_ins AS ON INSERT TO t1 > > WHERE (EXISTS (SELECT 1 FROM t1 > >

Re: [SQL] DO INSTEAD in rule

2004-01-04 Thread Tom Lane
Tatsuo Ishii <[EMAIL PROTECTED]> writes: > In the last SELECT I exepcted j = 0, rather than j = 1 since I use DO > INSTEAD in the rule and the default value for j is 0. Am I missing > something? > CREATE rule t1_ins AS ON INSERT TO t1 > WHERE (EXISTS (SELECT 1 FROM t1 >

[SQL] DO INSTEAD in rule

2004-01-04 Thread Tatsuo Ishii
Hi, In the last SELECT I exepcted j = 0, rather than j = 1 since I use DO INSTEAD in the rule and the default value for j is 0. Am I missing something? DROP TABLE t1 CASCADE; DROP TABLE CREATE TABLE t1 ( i INTEGER, j INTEGER DEFAULT 0 ); CREATE TABLE CREATE rule t1_ins AS ON INSER