144 points · by jkatz05 · 2w ago · 10 comments
Especially this one:
PostgreSQL 19 adds INSERT ... ON CONFLICT DO SELECT, which lets the RETURNING clause return existing rows that conflict with an insert, simplifying the common "get or create" pattern.
Update: it looks like yes, at least for basic scenarios (https://dev.to/gabrielanhaia/your-postgres-get-or-create-has...)
Or perhaps memory.
Probably depends how important it is to do something a certain way and when it decides to.
and thank you pg_repack, it's been a good ride!