Re: Gaps in PK sequence numbers [RESOLVED]

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Gaps in PK sequence numbers [RESOLVED]
Date: 2024-06-11 01:23:58
Message-ID: CAKFQuwYM7c3PLfp=ExueegJdT4GjXCx9iaaco-x1vri8qF0tyg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Monday, June 10, 2024, Rich Shepard <rshepard(at)appl-ecosys(dot)com> wrote:

>
> Is there a way to reset the sequence to the maximum
> number +1? I don't recall seeing this in the postgres docs but will look
> again.
>

https://www.postgresql.org/docs/current/functions-sequence.html

setval

The bigint argument can be computed from a query.

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2024-06-11 01:41:43 Re: Does trigger only accept functions?
Previous Message Christophe Pettus 2024-06-11 01:21:59 Re: Gaps in PK sequence numbers [RESOLVED]