cat > script <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
create view va as select distinct * from t1;
select from va;
update va;

create view vb as select a, a concat 'c' from t1;
select from vb;
update vb;

create view vc as select * from t1 where b in (select aa from tt);
select from vc;
update vc;

create view vd as select * from t1 group by a order by a;
select from vd;
update vd;

+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 script
cat > stdout <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
* create view va as select distinct * from t1;
* select from va;
a                b

abc              1
bcd              2
cde              3
def              4
efg              5
* update va;

*** Error: operation invalid on view 'va'
* 
* create view vb as select a, a concat 'c' from t1;
* select from vb;
a           EXPRESSION_1

abc         abcc
bcd         bcdc
cde         cdec
def         defc
efg         efgc
* update vb;

*** Error: operation invalid on view 'vb'
* 
* create view vc as select * from t1 where b in (select aa from tt);
* select from vc;
a                b

abc              1
cde              3
efg              5
* update vc;

*** Error: operation invalid on view 'vc'
* 
* create view vd as select * from t1 group by a order by a;
* select from vd;
a                b

abc              1
abc
bcd              2
bcd
cde              3
cde
def              4
def
efg              5
efg
* update vd;

*** Error: operation invalid on view 'vd'
* 
* 
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 stdout
cat > tag <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
Test new kind of conditions for updatable view,
because of the expanded view capability.
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 tag
cat > stdout.jp_euc <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
* create view va as select distinct * from t1;
* select from va;
a                b

abc              1
bcd              2
cde              3
def              4
efg              5
* update va;

*** Error: VIEW 'va' ̵ʺȤǤ
* 
* create view vb as select a, a concat 'c' from t1;
* select from vb;
a           EXPRESSION_1

abc         abcc
bcd         bcdc
cde         cdec
def         defc
efg         efgc
* update vb;

*** Error: VIEW 'vb' ̵ʺȤǤ
* 
* create view vc as select * from t1 where b in (select aa from tt);
* select from vc;
a                b

abc              1
cde              3
efg              5
* update vc;

*** Error: VIEW 'vc' ̵ʺȤǤ
* 
* create view vd as select * from t1 group by a order by a;
* select from vd;
a                b

abc              1
abc
bcd              2
bcd
cde              3
cde
def              4
def
efg              5
efg
* update vd;

*** Error: VIEW 'vd' ̵ʺȤǤ
* 
* 
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 stdout.jp_euc
