agora inbox for pgsql-admin@postgresql.org
help / color / mirror / Atom feedFrom: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: duplicate key value violates unique constraint
Date: Sat, 7 Mar 2020 15:13:26 -0600
Message-ID: <e4c5d934-038b-735b-ba53-88844ae7ed15@gmail.com> (raw)
In-Reply-To: <CAHaowgV2rKK3L30DcjbEy8-L+Pz5qyv8inpsr=y_=qxuXULzLw@mail.gmail.com>
References: <CAHaowgV2rKK3L30DcjbEy8-L+Pz5qyv8inpsr=y_=qxuXULzLw@mail.gmail.com>
Asking the same question on multiple lists is strongly frowned upon.
On 3/7/20 1:29 PM, Ashkar Dev wrote:
> Hi all,
>
> how to fix a problem, suppose there is a table with id and username
>
> if I set the id to bigint so the limit is 9223372036854775807
> if I insert for example 3 rows
> id username
> -- --------------
> 1 abc
> 2 def
> 3 ghi
>
> if I delete all rows and insert one another it is like
>
> id username
> -- --------------
> 4 jkl
>
>
> So it doesn't start again from non-available id 1, so what is needed to do
> to make the new inserts go into non-available id numbers?
--
Angular momentum makes the world go 'round.
view thread (13+ messages) latest in thread
Message-ID: <e4c5d934-038b-735b-ba53-88844ae7ed15@gmail.com>
Permalink: ../e4c5d934-038b-735b-ba53-88844ae7ed15@gmail.com/
Also on: postgresql.org/message-id/e4c5d934-038b-735b-ba53-88844ae7ed15@gmail.com
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: pgsql-admin@postgresql.org
Cc: ronljohnsonjr@gmail.com, pgsql-general@lists.postgresql.org
Subject: Re: duplicate key value violates unique constraint
In-Reply-To: <e4c5d934-038b-735b-ba53-88844ae7ed15@gmail.com>
* 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