Online Documentation for SQL Manager for PostgreSQL

Creating/editing sequence


Name

Select a schema and enter a name for the new sequence, or modify the name of the sequence being edited.

 

Sequence Editor - Editing sequence definition

 

 

Next Value (Start value - when creating a new sequence)

This option defines the sequence value to begin from. The default starting value is Min value for ascending sequences and Max value for descending ones.

 

Increment

Specifies which value is added to the current sequence value to create a new value. A positive value will make an ascending sequence, a negative one a descending sequence. The default value is 1.

 

Min Value

Determines the minimum value a sequence can generate.

 

Max Value

Determines the maximum value for the sequence.

 

Cache

Specifies how many sequence numbers are to be preallocated and stored in memory for faster access. The minimum value is 1 (only one value can be generated at a time, i.e., no cache).

 

CheckBox Temporary

If specified, the sequence object is created only for this session, and is automatically dropped on session exit. Existing permanent sequences with the same name are not visible (in this session) while the temporary sequence exists, unless they are referenced with schema-qualified names.

 

CheckBox Cycle

This option allows the sequence to wrap around when the maxvalue or minvalue has been reached by an ascending or descending sequence respectively. If the limit is reached, the next number generated will be the minvalue or maxvalue, respectively. Otherwise, any calls to nextval after the sequence has reached its maximum value will return an error.