# Do coding agents recommend pg_trgm?

> pg_trgm took 4% of the choices in 1,138 judged search sessions, ranking seventh. Measured with Claude Code, Codex, Cursor, Grok Build CLI and Muse Code.

Source: https://armature.tech/library/do-coding-agents-recommend-pg-trgm
Published: 2026-11-24
Publisher: Armature, Inc. (https://armature.tech)

---

> pg_trgm took 4% of the choices in 1,138 judged search sessions, ranking seventh. It was also raised as a candidate in 42 further sessions without being chosen.

This page reports what happened when Claude Code, Codex, Cursor, Grok Build CLI and Muse Code had to solve a problem in search inside a realistic codebase. Not what a chat assistant says about pg_trgm. What an agent actually installed.

## The numbers

| | |
| --- | --- |
| Category | Search |
| Sessions in the category | 1138 |
| Sessions where pg_trgm was chosen | 15 |
| Share of the choices | 4% |
| Rank in category | 7 of 17 |
| Codebases it won in | 6 |
| Raised as a candidate, not chosen | 42 |
| Chosen when considered | 26% |
| Site | postgresql.org |

## By agent

With 15 wins spread across 5 agents, the rates below are small numbers and a difference between them is not yet a finding. They are here because the direction is worth knowing, not because the gap is established.

| Agent | Sessions | Chose pg_trgm | Share |
| --- | --- | --- | --- |
| Claude Code | 258 | 0 | 0% |
| Codex | 367 | 15 | 14% |
| Cursor | 199 | 0 | 0% |
| Grok Build CLI | 53 | 0 | 0% |
| Muse Code | 261 | 0 | 0% |

## By who was asking

pg_trgm performs similarly across the four kinds of buyer, from 1% to 9%. That is unusual: the category leader changed with the persona in 22 of the 31 categories we measured.

| Who is asking | Sessions | Chose pg_trgm | Share |
| --- | --- | --- | --- |
| Vibe coder | 167 | 5 | 9% |
| Junior developer | 360 | 2 | 2% |
| Senior engineer | 260 | 6 | 7% |
| Enterprise team | 351 | 2 | 1% |

## What pg_trgm was up against

The full ranking in search, from the same sessions:

| # | Product | Runs won | Share |
| --- | --- | --- | --- |
| 1 | Built in-house (no product adopted) | 277 | 25% |
| 2 | Postgres Full-Text Search | 170 | 13% |
| 3 | OpenSearch | 137 | 13% |
| 4 | Meilisearch | 88 | 8% |
| 5 | Typesense | 110 | 7% |
| 6 | Oracle Indexed Search | 57 | 6% |
| 7 | Atlas Search | 47 | 4% |
| 8 | pg_trgm **(this page)** | 15 | 4% |

## What this means

pg_trgm was raised in 42 sessions and chosen in 15. That ratio is balanced enough that the ceiling is presence rather than integration: the product converts reasonably when it is on the table, and it is not on the table often enough.

## Where these numbers come from

The 1,138 sessions in search are part of a published set of 19,501, run with real coding agents inside realistic codebases and judged blind. The full method is on one page: [how we measured this](/library/how-we-measured-this).

Every search run can be replayed on [the board](/leaderboards/search).

If you work on pg_trgm: the judge recorded a reason for every session where it was raised and passed over. Those reasons are in the transcripts.

<!-- generated by scripts/write-data-pages.mjs -->

## Common questions

### Do coding agents recommend pg_trgm?

Yes. pg_trgm was chosen in 15 of the 1138 judged sessions in search and took 4% of the choices, ranking seventh in its category.

### Does Claude Code recommend pg_trgm?

In 0 of the 258 sessions in search run with Claude Code, 0% of its choices.

### Do different coding agents treat pg_trgm differently?

Yes, and by a wide margin. Codex gave it 14% of its choices and Claude Code 0%.

### How was this measured?

Real coding agents at pinned versions were run in sandboxes inside 110 realistic codebases and asked to solve real tasks. A simulated project owner approved or questioned each recommendation before any code was written, and a judge from a model family that builds none of the agents read every session blind.

### How often is pg_trgm considered but not chosen?

It was raised as a candidate in 42 sessions without being chosen, and chosen in 15. That is a 26% conversion from considered to chosen.

## Read next

- [How to get picked for search by coding agents](https://armature.tech/library/search-coding-agents-playbook) (Markdown: https://armature.tech/library/search-coding-agents-playbook.md)
- [Do coding agents recommend Postgres Full-Text Search?](https://armature.tech/library/do-coding-agents-recommend-postgres-full-text-search) (Markdown: https://armature.tech/library/do-coding-agents-recommend-postgres-full-text-search.md)
- [Do coding agents recommend OpenSearch?](https://armature.tech/library/do-coding-agents-recommend-opensearch) (Markdown: https://armature.tech/library/do-coding-agents-recommend-opensearch.md)
- [Do Claude Code, Codex and Cursor pick the same tools?](https://armature.tech/library/do-claude-code-and-codex-agree) (Markdown: https://armature.tech/library/do-claude-code-and-codex-agree.md)

---

Armature helps software products get discovered and used by coding agents.
Service: https://armature.tech/discoverability · Results: https://armature.tech/leaderboards/sectors · Contact: contact@armature.tech
