× Heads up!

Aqua Data Studio / nhilam

Follow
IDE for Relational Databases
×
nisha.gaikwad(*) reported 2013-10-28T13:24:01Z  · tariqrahiman last modified 2013-10-29T18:08:07Z

No alter Sequence option in greenplum


Priority Low
Complexity Unknown
Component App - Visual Editing
Version 15.0
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
 

Issue #10621

Closed
Won't Fix
Resolved 2013-10-29T18:08:07Z
 
 
Completion
No due date
No fixed build
No time estimate

About AquaClusters Privacy Policy Support Version - 19.0.2-4 AquaFold, Inc Copyright © 2007-2017