Subject Re: Identity
Author Thomas
--- In firebird-support@yahoogroups.com, Lester Caine <lester@...>
> But it is much more PRACTICAL since it allows you to do cleaver things like
> populate subdetail table entries using the SAME value you access from the
> generator. You don't know the value of an 'auto-incremented' field until AFTER
> it has been committed! Even better, you can use one generator for several key
> fields, which in my own designs is another useful facility.

I like PostgreSQL's solution: you can define the default value for a column based on a sequence. And it supports a "short hand" notation for that, which also ties the sequence to that column - which means the sequence will automatically be dropped if the table is dropped

That gives you actually the best of both worlds: the "comfort" of autoincrement and the flexibility of sequences.