Em 06/03/2016 10:55, Dimitry Sibiryakov escreveu: > 06.03.2016 14:47, Adriano dos Santos Fernandes wrote: >> Because that is not CEATE OR ALTER, that is CREATE OR >> DO-NOTHING-IF-EXIST and we do not have this command. >> >> It's explicitly designed to raise an error. > > ALTER is explicitly designed to raise an error. About CREATE OR ALTER I'm > not that sure. > >>> This command if perfectly ok from Language Reference POV: both START >>> WITH/RESTART and >>> INCREMENT clauses are marked as optional. >> Language Reference is bugged then! > > I think we need DE to make decision. >
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. > > At the same time, analyzing the standard, I see they allow RESTART [ > WITH <expr> ] in ALTER, i.e., restarting to 0, and we do not allow this > syntax. > > Maybe we can add this option and do not support CREATE OR ALTER SEQUENCE > without parameters? I.e.: Here I agree. ----------- Adriano ------------------------------------------------------------------------------ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel