CREATE SEQUENCE minvalue for descending sequence
Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.
You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:
docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t75993psql -h localhost -U postgresBuilt from patchset v2 (message #2), July 28, 2026 at 05:35 AM.
Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:
git clone --branch t75993_2 https://github.com/hackorum-dev/postgres.gitIn a checkout you already have, add the fork once:
git remote add hackorum https://github.com/hackorum-dev/postgres.gitthen, for this patchset and every later one:
git fetch hackorum t75993_2 && git checkout t75993_2Patchset v2 (message #2) is on t75993_2
Hello,
while reading your documentation about create sequence I found that you
mention the minvalue for a descending sequence is -263-1.
But as far as I know the minvalue of long is -263+1.
The mentioned documentation is at:
https://www.postgresql.org/docs/9.6/static/sql-createsequence.html
On Wed, Aug 16, 2017 at 10:00 PM, Klemens Eisenstecken
<klemens.eisenstecken@gmail.com> wrote:
Hello,
while reading your documentation about create sequence I found that you
mention the minvalue for a descending sequence is -2^63-1.But as far as I know the minvalue of long is -2^63+1.
The mentioned documentation is at:
https://www.postgresql.org/docs/9.6/static/sql-createsequence.html
Logically the minimum value of long is -2^63, the maximum being 2^63 -
1, but as you say the default minvalue of a descending sequence is
-2^63 + 1, so the docs are wrong. Note that Postgres has changed this
idiotic minimal value behavior in 10, using now the real minimum value
of the types used with a sequence.
--
Michael
Thank you for the clarification!
Michael Paquier <michael.paquier@gmail.com> schrieb am Do., 17. Aug. 2017
um 04:14 Uhr:
Show quoted text
On Wed, Aug 16, 2017 at 10:00 PM, Klemens Eisenstecken
<klemens.eisenstecken@gmail.com> wrote:Hello,
while reading your documentation about create sequence I found that you
mention the minvalue for a descending sequence is -2^63-1.But as far as I know the minvalue of long is -2^63+1.
The mentioned documentation is at:
https://www.postgresql.org/docs/9.6/static/sql-createsequence.htmlLogically the minimum value of long is -2^63, the maximum being 2^63 -
1, but as you say the default minvalue of a descending sequence is
-2^63 + 1, so the docs are wrong. Note that Postgres has changed this
idiotic minimal value behavior in 10, using now the real minimum value
of the types used with a sequence.
--
Michael