5.14. Sequences #
This section explains how to manage sequences. It contains the following instructions:
Creating a Sequence
In the navigation panel, go to Databases.
Click the name of the database.
Click the name of the schema.
Select Sequences.
In the top-right corner of the page, click Create sequence.
In Name, enter the unique name of the sequence.
(Optional) Turn on Extended settings and specify additional parameters:
No logging: Specifies whether the changes of the created sequence will not be saved to WAL.
Cycle: Specifies whether the created sequence is cycled.
Data type.
Possible values:
Default: The default value is Bigint.
Smallint.
Integer.
Bigint.
Min. value: The minimum value that will be generated by the sequence.
Max. value: The maximum value that will be generated by the sequence.
Start: The start value of the sequence.
Step: The number that will be added to the current sequence value to receive a new value.
Cache: The number of sequence values that will be allocated and stored in memory for faster access.
lock_timeout, s: Abort any statement that waits longer than the specified time while attempting to acquire a lock on a table, index, row, or other database object. The time limit applies separately to each lock acquisition attempt.
For more information about this parameter, refer to the official Postgres Pro documentation.
Click Create.
Viewing Sequences
In the navigation panel, go to Databases.
Click the name of the database.
Click the name of the schema.
Select Sequences.
The table of sequences with the following columns will be displayed:
Name.
Owner.
Data type: The data type of the sequence values.
Last_value: The last value of the sequence.
Min. value and Max. value: The minimum and maximum possible sequence values.
Step: The step for changing the sequence values.
Cycle: Specifies whether the sequence is cycled and restarts upon reaching its limit.
Cache: The number of sequence values that will be allocated and stored in memory for faster access.
Last_value: The last value of the sequence.
Actions.
For more information about available actions, refer to other instructions in this section.
Editing a Sequence
In the navigation panel, go to Databases.
Click the name of the database.
Click the name of the schema.
Select Sequences.
Click
next to the sequence. Edit sequence parameters.
Click Save.
Deleting a Sequence
Important
Deleted sequences cannot be restored.
To delete a sequence:
In the navigation panel, go to Databases.
Click the name of the database.
Click the name of the schema.
Select Sequences.
Click
next to the sequence. (Optional) To delete all sequence objects, turn on Cascade deletion.
Click Delete.