Chela: Small URL Shortener
github.comTangential recommendation: Postgres' "generated always as identity" should be preferred over the "serial" types.
Nice catch! It probably would be good to switch to an IDENTITY column, but it shouldn't make too much of a difference because Chela manages the state of the index manually anyways.
In order to create new IDs it consumes the next value of the index column, and then manually sets the index and the ID in one go.