How to use Claude to update a PostgreSQL extension
Claude Code helped restore a PRQL PostgreSQL extension using upstream source inspection and existing tests; the maintainer then manually refactored it.
Prompt to try
Editorial adaptation, not the source author’s exact prompt. Replace bracketed inputs and review tool permissions first.
Investigate [dependency breaking change] in [PostgreSQL extension]. Inspect upstream PostgreSQL source and relevant documentation, resolve [return-value compatibility issue], and run [existing test suite]. Present remaining quality issues for my review before release.
Reach people exploring AI agents
See placements →What happened
The maintainer released v18.0.0 after the compatibility work, then made manual refactorings and released v18.0.1.
Reported by kaspermarstal on Hacker NewsHow the agent did it
- Attempted a dependency compatibility fix and abandoned an incomplete branch.
- Retried with Sonnet 4.5 and had Claude Code inspect PostgreSQL source.
- Used WebSearch and existing tests to resolve return-value compatibility.
Where a person stepped in
The maintainer relied on a pre-existing comprehensive test suite and manually refactored unsatisfactory quality changes before a follow-up release.
A person approved each step before the agent continued.
A breaking dependency change left the author's PostgreSQL extension for PRQL unable to support PostgreSQL 17. An early attempt with Claude Code made partial progress: the model worked out how to return one kind of value but could not generalize the solution to table and set iterators whose column types were unknown at compile time. The maintainer abandoned that branch as family responsibilities limited development time.
After PostgreSQL 18 and Claude Sonnet 4.5 became available, the maintainer tried again. Claude Code cloned the PostgreSQL repository and examined its internals. With WebSearch and an existing comprehensive test suite, it worked out how to return pg_sys::Datums, sets of records and HeapTuples.
The maintainer relied on that test suite when releasing version 18.0.0. Subsequent requests for quality improvements produced unsatisfactory changes, so the maintainer performed manual refactorings and released version 18.0.1. The account distinguishes the successful compatibility work from cleanup that still required human intervention. Who it's for: open-source maintainers with established tests who need help investigating low-level compatibility changes while retaining responsibility for release quality.
Prompt
Suggested prompt (written by Agents In Use, not the author's)
Source: Hacker News · kaspermarstal
Frequently asked questions
What helped the successful attempt?
The author describes Claude Sonnet 4.5, inspection of PostgreSQL internals, WebSearch and an existing comprehensive test suite.
Was the release entirely automated?
The maintainer released the versions and manually refactored after subsequent AI quality improvements went wrong.
More details
Remaining steps
- Released v18.0.0, manually refactored, then released v18.0.1.
About this account
Claude Code investigated upstream internals and implemented compatibility work with search and the existing test suite.
Platform: Hacker News. Attribution: https://news.ycombinator.com/item?id=45864546. Prompt: Suggested (written by Agents In Use, not the author's). Sourced by the Agents In Use pipeline.
Credit: kaspermarstal on Hacker News
Source published 9 Nov 2025
Source checked 14 Oct 2026
Tools and topics
Claude Code · Claude Sonnet 4.5 · PostgreSQL · WebSearch · pgrx
Agent workflows
Editorial completeness: 100/100. Measures documented fields, not agent performance or verified outcomes.