# acdat 0.1.0：带类型的匹配机器与事务化字典

> C/PGXS 重建版面向 PG14–18，以源码标签发布。固定 acdat 模式提供了可持久化、可复用的 machine 类型。

---

LLMS 索引： [llms.txt](/zh/llms.txt)

---

C/PGXS 重建版面向 PG14–18，以源码标签发布。固定 acdat 模式提供了可持久化、可复用的 machine 类型。

[标签源码](https://github.com/pgsty/acdat/tree/v0.1.0)

## 变更 {#changes}

| 范围 | 变更 | 依据 |
| --- | --- | --- |
| SQL | 可编译 text、bytea 数组或聚合源规则行，支持枚举命中位置、布尔匹配与字面替换。 | [acdat--0.1.0.sql](https://github.com/pgsty/acdat/blob/v0.1.0/sql/acdat--0.1.0.sql) |
| 存储 | 机器采用可传输的序列化格式，提供校验、导入导出和规则、构建、载荷摘要。 | [acdat_format.c](https://github.com/pgsty/acdat/blob/v0.1.0/src/acdat_format.c) |
| 生命周期 | 发布不可变构建，事务化切换活动指针，重新激活此前的就绪构建即可回滚。 | [acdat--0.1.0.sql](https://github.com/pgsty/acdat/blob/v0.1.0/sql/acdat--0.1.0.sql) |
| 许可 | 该标签使用 PostgreSQL 风格的宽松许可。 | [LICENSE](https://github.com/pgsty/acdat/blob/v0.1.0/LICENSE) |

## 字典构建 {#details}

规则集现在可以保存为 machine 值；命中返回规则 ID 和位置。托管构建可在事务中激活，业务继续维护原始规则。

## 安装与升级 {#upgrade}

标签未提供从 bytea 原型到 0.1.0 的升级脚本。保留源规则，在新库安装并重新编译字典。

```sql
CREATE EXTENSION acdat VERSION '0.1.0';
```

## 兼容性 {#compatibility}

标签中的 CI 矩阵覆盖 PG14–18。

## 核验 {#verification}

核验材料见 [.github/workflows/ci.yml](https://github.com/pgsty/acdat/blob/v0.1.0/.github/workflows/ci.yml) · [examples/demo.sql](https://github.com/pgsty/acdat/blob/v0.1.0/examples/demo.sql) · [test/dump_restore.sh](https://github.com/pgsty/acdat/blob/v0.1.0/test/dump_restore.sh).
