Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Related Rants
So, here we are using postgres in production with the fancy feature of UPSERT. We’ve got loads of request popping in, both new and updates - so the UPSERT getting triggered alot. Today we faced a problem with integer within our app stating that the number is too high. We were like «WTF? Already?!»! After looking in to the features of UPSERT, we came to realize that any sequence will be incremented regardless of an insert being handled. This results then in an ID field being defined with ids such as:
1
2
5
19
222
73377
282828282
Etc. You get the point..
This design is so WTF and I have absolutely no idea why anyone would like their IDs to be generated and incremended even though there is no insert. I hope it is due to my naivity that I cannot comprhend it. Oh well. UPSERT, you’re forever gone 👍🔥
rant
upsert
upset
wtf
java
postgres
db