News for hackers. Stuff that matters.
Re:Moving Away from UUIDs by sa46 on Tuesday November 22, 2022 @02:25AM (#33703061)
> I can create them all with one round trip rather than multiple.

I see. I'd lean towards using common table expressions. The first insert statement returns the primary key and other inserts can depend on the key. I do understand it's not a panacea and composing queries can be problematic.

> a sequence generator for PKs, it becomes a resource around which there is contention

As I understand, Postgres sequences don't block which leads to a different problem [1].

[1]: https://news.ycombinator.com/item?id=27843084

There are no comments on this comment yet.