Re: duplicate key value violates unique constraint

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: duplicate key value violates unique constraint
Дата
Msg-id CAKFQuwaVzH=1UMQr74uM_kLkZVDky+4ei8ufE6QFM9LHQHQ8rQ@mail.gmail.com
обсуждение исходный текст
Ответ на Fwd: duplicate key value violates unique constraint  (Ashkar Dev <ashkardev@gmail.com>)
Ответы Re: duplicate key value violates unique constraint
Список pgsql-admin
On Sat, Mar 7, 2020 at 12:35 PM Ashkar Dev <ashkardev@gmail.com> wrote:

Hi all,

how to fix a problem, suppose there is a table with id and username

You should probably provide the definition though in this case it is self-evident that you are using bigserial.


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?

Alter sequence



and if the id reaches the limit and maybe there is some ids that are not used.

This is highly unlikely.

Is the subject line supposed to relate to this in some way?

You should not worry about any of this in production; and frankly, worrying about it in development is largely pointless as well.

There is no actual problem here to be fixed.

David J.

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Dave Bolt"
Дата:
Сообщение: RE: duplicate key value violates unique constraint
Следующее
От: Ashkar Dev
Дата:
Сообщение: Re: duplicate key value violates unique constraint