public inbox for [email protected]
help / color / mirror / Atom feedFrom: Rich Shepard <[email protected]>
To: [email protected]
Subject: Re: Gaps in PK sequence numbers [RESOLVED]
Date: Tue, 11 Jun 2024 05:28:45 -0700 (PDT)
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
On Mon, 10 Jun 2024, Christophe Pettus wrote:
> The sequence functions are documented here:
> https://www.postgresql.org/docs/current/functions-sequence.html
> setval is the function you want. You can use a SELECT so you don't have to
> copy values around:
> select setval('t_pk_seq', (select max(pk) from t));
> That form of setval() sets the sequence so that the next value will be one
> more than the value you set it to, so you don't have to do max()+1 there.
Thanks again, Christophe.
Regards,
Rich
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Gaps in PK sequence numbers [RESOLVED]
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox