Hi,
Running the SQL below (in Ingres 10), the first insert into x works, the second gives an integer overflow.
The failure relies on rather a poor design decision that's easily prevented, but just out of interest - a bug or not?
G
Code:
create sequence seq_int8;
create table x(
a integer not null with default seq_int8.nextval, -- D'oh!
b integer not null);
create table y (b integer not null);
insert into y values (1);
insert into y values (2);
insert into y values (3);
insert into x(b) select first 1 b from y;
insert into x(b) select first 1 b from y order by 1;