Timeline for How to reset Postgres' primary key sequence when it falls out of sync?
Current License: CC BY-SA 3.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 25, 2023 at 21:43 | comment | added | Rob | I'll post a fixed version here. | |
| Mar 25, 2023 at 21:43 | comment | added | Rob | This code is buggy. In particular, if you have no rows in a table, it doesn't set the next sequence value to 1. It doesn't reset it at all. | |
| Sep 5, 2020 at 7:16 | comment | added | Phoenix |
Oh that was a silly mistake, In my case data had been migrated into the postgres DB instead of sentry. I hope it'll help others
|
|
| S Nov 28, 2016 at 13:54 | history | suggested | Community Bot | CC BY-SA 3.0 |
Completed the answer with 'HOWTO' instruction from the same wiki and source link
|
| Nov 28, 2016 at 10:47 | review | Suggested edits | |||
| S Nov 28, 2016 at 13:54 | |||||
| Jul 25, 2016 at 19:29 | history | answered | Pietro | CC BY-SA 3.0 |