# 您的 Postgres 迁移是安全的还是不安全的？

- 来源：Hacker News 热门（buzzing.cc 中文翻译）
- 作者：vira28
- 发布时间：2026-09-27 02:01
- AIHOT 分数：35
- AIHOT 链接：https://aihot.news/items/cmuiq9dg502s8rohytth26ji3
- 原文链接：https://safenotsafe.dev/

## AI 摘要

safe-not-safe 工具可通过 `npx safe-not-safe check migration.sql` 命令检查 Postgres 迁移是否安全。它基于 libpg_query 17 的 WASM 解析器，在浏览器 worker 中下载并编译，支持 PostgreSQL 16，且无遥测。

## 正文

Downloading and compiling libpg_query WASM in a browser worker.

0 flagged of 0

bash+⌃`

$ npx safe-not-safe check migration.sql

parse libpg_query 17 (wasm) · initializing · 0 statements · 301 chars

note Downloading and compiling the PostgreSQL WASM parser.

No statements found. Paste a migration or load a sample.

CHECKING — Loading PostgreSQL parser.

Downloading and compiling libpg_query WASM in a browser worker.

$

CHECKING0 flagged · 0 statementsLn 1, Col 1PostgreSQL 16SQLno telemetryGitHub
