Subject | Generators |
---|---|
Author | Daniel Aut |
Post date | 2003-10-11T21:45:36Z |
Why a generator doesn't respect transactions?
select gen_id(gen1, 1) from table1;
1
select gen_id(gen1, 1) from table1;
2
select gen_id(gen1, 1) from table1;
3
ROLLBACK;
select gen_id(gen1, 1) from table1;
4
select gen_id(gen1, 1) from table1;
5
Doesn't have to be a 1 instead of a 4?
I'm thinking about producing the unique value for a primary key with "select
max(...) + 1 from..."... i know it's not a good idea for eficiency... but it
works, not?
Thank you,
Daniel Aut
daniel.aut@...
select gen_id(gen1, 1) from table1;
1
select gen_id(gen1, 1) from table1;
2
select gen_id(gen1, 1) from table1;
3
ROLLBACK;
select gen_id(gen1, 1) from table1;
4
select gen_id(gen1, 1) from table1;
5
Doesn't have to be a 1 instead of a 4?
I'm thinking about producing the unique value for a primary key with "select
max(...) + 1 from..."... i know it's not a good idea for eficiency... but it
works, not?
Thank you,
Daniel Aut
daniel.aut@...