ADS Version : Aqua Data Studio 15.0.0-dev-29
Database: Greenplum 4.2
Connect Greenplum -> Open a query analyzer window and run following scripts
CREATE SEQUENCE public.id_sequence
INCREMENT 1
MAXVALUE 9223372036854775806
MINVALUE 10
START 11
GO
Here "id_sequence" created in Sequence folder.
Go to Sequence folder -> go to "id_sequence" Sequence ->Right click -> In drop down list Alter Sequence option is not provided.
But we can alter Sequence from query Analyzer window run following script
CREATE TABLE public.test_sequence(id integer NOT NULL )
GO
INSERT INTO test_sequence(id)VALUES(nextval('id_sequence'))
GO
//Run insert query for two three times
SELECT * FROM test_sequence
GO
//Here id value is set to 11 and so on because we call "id_sequence" sequence through nextval() function in insert query.
ALTER SEQUENCE "id_sequence" RESTART WITH 30
GO
INSERT INTO test_sequence(id)VALUES(nextval('id_sequence'))
GO
SELECT * FROM test_sequence
GO
// Here we can see the initial value changes to 30
Also we can alter schema of sequence to alter schema run following script on query analyzer
ALTER SEQUENCE id_sequence SET SCHEMA gp_toolkit
before alter sequence sequence is in public schema after alter sequence "id_sequence" move to gp_toolkit schema
https://www.aquaclusters.com/app/home/project/public/aquadatastudio/issue/7919
Please use AquaClusters effectively. Search for terms like Greenplum Sequence and you can see results for issues which says clearly that it wont be supported for the time being.
Greenplum is based on PostgreSQL 8.2. and until they update the core to PostgreSQL 9.2 we cannot support Alter Sequence, because the information is unavailable in the system catalog tables.
We are now displaying sequence properties in PostgreSQL 9.2+