# acdat 0.0.2: Literal replacement on PG16

> This PostgreSQL 16 source tag adds literal rewriting to the bytea dictionary prototype.

---

LLMS index: [llms.txt](/llms.txt)

---

This PostgreSQL 16 source tag adds literal rewriting to the bytea dictionary prototype. [Source tag](https://github.com/pgsty/acdat/tree/v0.0.2).

## Changes {#changes}

| Area | Change | Evidence |
| --- | --- | --- |
| Dictionary | Optional replacements travel with compiled patterns. The install and update scripts expose `acdat_replace(text, bytea)`. | [acdat--0.0.2.sql](https://github.com/pgsty/acdat/blob/v0.0.2/sql/acdat--0.0.2.sql) |
| Selection | Replacement walks left to right, selects the longest pattern at a start, breaks equal-length ties by dictionary order and never rescans inserted text. | [README.md](https://github.com/pgsty/acdat/blob/v0.0.2/README.md) |
| Validation | Compiled offsets and pattern payloads are bounded; regression cases cover overlaps and rule ordering. | [acdat_basic.sql](https://github.com/pgsty/acdat/blob/v0.0.2/sql/acdat_basic.sql) |
