06.03.2016 17:00, Adriano dos Santos Fernandes wrote: > Not sure if he remembers, but that has already discussed by me and he at > the time this command was firstly created ;) > > ----------- >> >I think this command has something weird: >> > >> >SQL> create sequence s1 start with 4; >> >SQL> create or alter sequence s1 start with 5; >> >SQL> show sequence s1; >> >Generator S1, current value is 5 >> >SQL> create or alter sequence s1; -- weird >> >SQL> show sequence s1; >> >Generator S1, current value is 0 -- weird >> > >> >Current CREATE OR ALTER without options is weird because restarts the >> >sequence, while it's not obvious thinking on the ALTER part. And if it's >> >changed to do nothing, then it's not CREATE OR ALTER anymore, it will >> >have "create if not exists" semantics.
For me it rather look like he was against unexpected resetting of sequence to zero, but I don't see in this quote definite objections against ""create if not exists" semantics". I, personally, think that this semantic is useful because such operation cannot be done in any other (convenient) way. -- WBR, SD. ------------------------------------------------------------------------------ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel