mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Change the logic of setval function, so that the next nextval of sequence will return exactly the specified value. #3273
This commit is contained in:
parent
1e00611792
commit
1317e5a921
@ -20,9 +20,11 @@ Bundled PostgreSQL Utilities
|
|||||||
New features
|
New features
|
||||||
************
|
************
|
||||||
|
|
||||||
|
|
||||||
| `Issue #6513 <https://github.com/pgadmin-org/pgadmin4/issues/6513>`_ - Change button labels and color in delete confirmation dialog for all objects to improve UX.
|
| `Issue #6513 <https://github.com/pgadmin-org/pgadmin4/issues/6513>`_ - Change button labels and color in delete confirmation dialog for all objects to improve UX.
|
||||||
| `Issue #7708 <https://github.com/pgadmin-org/pgadmin4/issues/7708>`_ - Enhanced pgAdmin 4 with support for Workspace layouts.
|
| `Issue #7708 <https://github.com/pgadmin-org/pgadmin4/issues/7708>`_ - Enhanced pgAdmin 4 with support for Workspace layouts.
|
||||||
| `Issue #8332 <https://github.com/pgadmin-org/pgadmin4/issues/8332>`_ - Added the MAINTAIN privilege for PostgreSQL version 17 and above.
|
| `Issue #8332 <https://github.com/pgadmin-org/pgadmin4/issues/8332>`_ - Added the MAINTAIN privilege for PostgreSQL version 17 and above.
|
||||||
|
| `Issue #8391 <https://github.com/pgadmin-org/pgadmin4/issues/8391>`_ - Add support for OAuth2 profile array response, which also takes care of the GitHub Private Email ID issue.
|
||||||
|
|
||||||
Housekeeping
|
Housekeeping
|
||||||
************
|
************
|
||||||
@ -32,6 +34,7 @@ Housekeeping
|
|||||||
Bug fixes
|
Bug fixes
|
||||||
*********
|
*********
|
||||||
|
|
||||||
|
| `Issue #3273 <https://github.com/pgadmin-org/pgadmin4/issues/3273>`_ - Change the logic of setval function, so that the next nextval of sequence will return exactly the specified value.
|
||||||
| `Issue #5204 <https://github.com/pgadmin-org/pgadmin4/issues/5204>`_ - Fixed an issue where pgadmin cannot install into path with non ASCII characters.
|
| `Issue #5204 <https://github.com/pgadmin-org/pgadmin4/issues/5204>`_ - Fixed an issue where pgadmin cannot install into path with non ASCII characters.
|
||||||
| `Issue #6044 <https://github.com/pgadmin-org/pgadmin4/issues/6044>`_ - Fixed an issue where filter dialog save fails when the PostgreSQL server/database connection is lost.
|
| `Issue #6044 <https://github.com/pgadmin-org/pgadmin4/issues/6044>`_ - Fixed an issue where filter dialog save fails when the PostgreSQL server/database connection is lost.
|
||||||
| `Issue #6968 <https://github.com/pgadmin-org/pgadmin4/issues/6968>`_ - Fixed an issue where option key was not registering in PSQL tool.
|
| `Issue #6968 <https://github.com/pgadmin-org/pgadmin4/issues/6968>`_ - Fixed an issue where option key was not registering in PSQL tool.
|
||||||
|
@ -35,6 +35,9 @@ Click the *Definition* tab to continue.
|
|||||||
|
|
||||||
Use the fields in the *Definition* tab to define the sequence:
|
Use the fields in the *Definition* tab to define the sequence:
|
||||||
|
|
||||||
|
* Use the *Current Value* field to specify the sequence object\'s current value.
|
||||||
|
The next nextval will return exactly the specified value, and sequence advancement
|
||||||
|
commences with the following nextval. *This field is only available in the edit mode*.
|
||||||
* Use the *Increment* field to specify which value is added to the current
|
* Use the *Increment* field to specify which value is added to the current
|
||||||
sequence value to create a new value.
|
sequence value to create a new value.
|
||||||
* Provide a value in the *Start* field to specify the beginning value of the
|
* Provide a value in the *Start* field to specify the beginning value of the
|
||||||
|
@ -136,6 +136,7 @@ export default class SequenceSchema extends BaseUISchema {
|
|||||||
}, {
|
}, {
|
||||||
id: 'current_value', label: gettext('Current value'), type: 'int',
|
id: 'current_value', label: gettext('Current value'), type: 'int',
|
||||||
mode: ['properties', 'edit'], group: gettext('Definition'),
|
mode: ['properties', 'edit'], group: gettext('Definition'),
|
||||||
|
helpMessage: gettext('Sets the sequence object\'s current value. The next nextval will return exactly the specified value, and sequence advancement commences with the following nextval.')
|
||||||
}, {
|
}, {
|
||||||
id: 'increment', label: gettext('Increment'), type: 'int',
|
id: 'increment', label: gettext('Increment'), type: 'int',
|
||||||
mode: ['properties', 'create', 'edit'], group: gettext('Definition'),
|
mode: ['properties', 'create', 'edit'], group: gettext('Definition'),
|
||||||
|
@ -20,7 +20,7 @@ ALTER SEQUENCE IF EXISTS {{ conn|qtIdent(o_data.schema, data.name) }}
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% if data.current_value is defined %}
|
{% if data.current_value is defined %}
|
||||||
{% set seqname = conn|qtIdent(o_data.schema, data.name) %}
|
{% set seqname = conn|qtIdent(o_data.schema, data.name) %}
|
||||||
SELECT setval({{ seqname|qtLiteral(conn) }}, {{ data.current_value }}, true);
|
SELECT setval({{ seqname|qtLiteral(conn) }}, {{ data.current_value }}, false);
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if data.relpersistence in [True, False] and data.relpersistence != o_data.relpersistence %}
|
{% if data.relpersistence in [True, False] and data.relpersistence != o_data.relpersistence %}
|
||||||
|
@ -20,7 +20,7 @@ ALTER SEQUENCE IF EXISTS {{ conn|qtIdent(o_data.schema, data.name) }}
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% if data.current_value is defined %}
|
{% if data.current_value is defined %}
|
||||||
{% set seqname = conn|qtIdent(o_data.schema, data.name) %}
|
{% set seqname = conn|qtIdent(o_data.schema, data.name) %}
|
||||||
SELECT setval({{ seqname|qtLiteral(conn) }}, {{ data.current_value }}, true);
|
SELECT setval({{ seqname|qtLiteral(conn) }}, {{ data.current_value }}, false);
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% set defquery = '' %}
|
{% set defquery = '' %}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
SELECT setval(E'public."Seq1_$%{}[]()&*^!@""''`\\/#"', 7, true);
|
SELECT setval(E'public."Seq1_$%{}[]()&*^!@""''`\\/#"', 7, false);
|
||||||
|
|
||||||
ALTER SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
|
ALTER SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
|
||||||
INCREMENT 12
|
INCREMENT 12
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
SELECT setval(E'public."Seq1_$%{}[]()&*^!@""''`\\/#"', 7, true);
|
SELECT setval(E'public."Seq1_$%{}[]()&*^!@""''`\\/#"', 7, false);
|
||||||
|
|
||||||
ALTER SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
|
ALTER SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
|
||||||
INCREMENT 12
|
INCREMENT 12
|
||||||
|
Loading…
Reference in New Issue
Block a user