Hacker News

PostgreSQL 19 Released

140 points by jkatz05 ago | 10 comments

ddxv |next [-]

I respect their decision to delay a bit. Looking forward to trying it out.

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.

nick_ |root |parent |next [-]

Any idea if the select is guaranteed to "see" the conflicting record? For example, if it was deleted "between" the insert failure and the select?

Update: it looks like yes, at least for basic scenarios (https://dev.to/gabrielanhaia/your-postgres-get-or-create-has...)

borzi |root |parent |previous [-]

My agents will be so excited.

nextaccountic |root |parent [-]

well, then give them a skill just with what's new

hologramofham |root |parent |next [-]

I think it depends.. I'd put it in my Claude.md (or one in a folder where my db stuff is, depends on project) so it's definitely always seen.

Or perhaps memory.

Probably depends how important it is to do something a certain way and when it decides to.

jimbob45 |root |parent |previous [-]

Are skills not just documentation? Did we really need a new word for documentation? Or am I just an old geezer ranting that thongs go on your feet?

nextaccountic |root |parent [-]

You're partially right, the body of a skill is just documentation. The actual innovation here is skill routing: agents load just the description of the skill, and load its body only when it's necessary.

Nowadays skills are probably not needed in most cases. Agents can already decide to load documentation when it's needed, even with no skills. (also it probably makes no difference to add a skill, or add a line to AGENTS.md saying to consult docs/something.md or some website, apart from organization of the instructions, for human purposes). The value of skills is to provide a reminder of a list of procedures and other stuff that the human user consider important. So it's possible that for some given session, the agent wouldn't consider on their own to look up what's new in Postgres 19, but was nudged into looking into it because of a skill.

The downside, of course, is bloating all sessions with a list of skill descriptions in context, even when the skill is not needed. That's why people should generally curate the list of skills for each project.

Anyway yeah if you are thinking just about migrating a project to postgres 19, a skill is probably not a great fit (since we generally migrate just once). But since agents probably don't have yet in their weights the new postgres 19 features, it's probably a good thing to remind them of the new features if they work with postgres 19 every other session.

perdy |next |previous [-]

The ON CONFLICT DO SELECT looks like a good addition, getting the existing row back from RETURNING. No more second SELECT after DO NOTHING.

_rwo |next |previous [-]

excited about the build-in repack, that took a while

and thank you pg_repack, it's been a good ride!

okc4pardon |next |previous [-]

[flagged]

vivzkestrel |previous [-]

[flagged]

hans_castorp |root |parent [-]

Nothing in those release notes refers to "key value stores"