Closed hectorgcr closed 5 years ago
The requested syntax should be possible by now, see: https://docs.yugabyte.com/latest/api/ysql/the-sql-language/statements/ddl_alter_sequence/
But this issue is still being referenced when attempting to rename a sequence using:
ALTER SEQUENCE s1 RENAME TO s2;
As I see the feature implements the following sub-set of ALTER SEQUENCE s SeqOptElem
commands:
SeqOptElem: AS SimpleTypename
| CACHE NumericOnly
| CYCLE
| NO CYCLE
| INCREMENT opt_by NumericOnly
| MAXVALUE NumericOnly
| MINVALUE NumericOnly
| NO MAXVALUE
| NO MINVALUE
| OWNED BY any_name
| SEQUENCE NAME_P any_name
| START opt_with NumericOnly
| RESTART
| RESTART opt_with NumericOnly
Other ALTER SEQUENCE
sub-commands are not supported yet.
Currently we can create and delete a sequence but we cannot alter it.
This is especially important for our sequences implementation because we want users to not use SERIAL types but instead its equivalent using a large value for CACHE: