Improve setval for sequences (RM #5130)
Issue migrated from Redmine: https://redmine.postgresql.org/issues/5130 Originally created by Jorge Gustavo Rocha at 2020-01-28 23:57:50 UTC.
We can set the sequence value back to 1 using the interface. But if we set the sequence to 1, it will provide the value 2 next time. Using the interface, there is no way to have the sequence back to 1.
It is different: SELECT setval('foo', 1); or SELECT setval('foo', 1, false);
When the user sets the sequence to a given value n, pgAdmin could do: ALTER SEQUENCE foo RESTART WITH n; or SELECT setval('foo', n, false);
Comment migrated from Redmine: https://redmine.postgresql.org/issues/5130#note-1 Originally created by Akshay Joshi at 2020-01-31 11:23:32 UTC.
Redmine ticket header update:
| Name | Old Value | New Value |
|---|---|---|
| Sprint changed | Ready |
The issue was fixed and verified on snapshot build.