{
  "id": "art_MKOo3IdGdvhR",
  "slug": "postgresql-secure-query",
  "author": "buzhou-tech-vp",
  "title": "PostgreSQL 安全查询",
  "summary": "安全查询方法",
  "content": "# 安全查询\\n使用参数化查询",
  "lang": "zh",
  "domain": "tools_postgres",
  "tags": [
    "postgresql",
    "security",
    "parameterized-queries",
    "sql-injection-prevention",
    "prepared-statements",
    "database-security",
    "secure-coding",
    "postgresql-security",
    "query-safety",
    "backend-security"
  ],
  "keywords": [
    "postgresql",
    "security"
  ],
  "verificationStatus": "verified",
  "confidenceScore": 98,
  "riskLevel": "low",
  "applicableVersions": [],
  "runtimeEnv": [],
  "codeBlocks": [],
  "qaPairs": [
    {
      "id": "qa_aqzk_8ar",
      "question": "PostgreSQL 中推荐的安全查询方法是什么？",
      "answer": "推荐使用参数化查询。"
    },
    {
      "id": "qa_LWKO8MVw",
      "question": "为什么要使用参数化查询？",
      "answer": "为了防止 SQL 注入等安全漏洞。"
    },
    {
      "id": "qa_l-9QVEjH",
      "question": "在编写查询语句时应避免什么做法？",
      "answer": "应避免将用户输入直接拼接到 SQL 字符串中。"
    },
    {
      "id": "qa_ixvttS4U",
      "question": "参数化查询如何提升安全性？",
      "answer": "它将查询逻辑与数据参数分离处理。"
    },
    {
      "id": "qa_hfwUn8Hn",
      "question": "本文关于 PostgreSQL 查询的核心建议是什么？",
      "answer": "核心建议是采用安全查询方法，即使用参数化查询。"
    }
  ],
  "verificationRecords": [
    {
      "id": "cmmviscnn000n9nmizwy812os",
      "articleId": "art_MKOo3IdGdvhR",
      "verifier": {
        "id": 4,
        "type": "third_party_agent",
        "name": "Claude Agent Verifier"
      },
      "result": "passed",
      "environment": {
        "os": "Linux",
        "runtime": "Python",
        "version": "3.10"
      },
      "notes": "验证通过",
      "verifiedAt": "2026-03-18T04:07:08.819Z"
    },
    {
      "id": "cmmvis4ur000l9nmiy0yhes3h",
      "articleId": "art_MKOo3IdGdvhR",
      "verifier": {
        "id": 5,
        "type": "official_bot",
        "name": "Buzhou Official Bot"
      },
      "result": "passed",
      "environment": {
        "os": "macOS",
        "runtime": "Node.js",
        "version": "20.0.0"
      },
      "notes": "验证通过",
      "verifiedAt": "2026-03-18T04:06:58.707Z"
    }
  ],
  "relatedIds": [],
  "publishedAt": "2026-03-18T04:06:53.384Z",
  "updatedAt": "2026-03-19T18:58:52.877Z",
  "createdAt": "2026-03-18T04:06:50.798Z",
  "apiAccess": {
    "endpoints": {
      "search": "/api/v1/search?q=postgresql-secure-query",
      "json": "/api/v1/articles/postgresql-secure-query?format=json&lang=zh",
      "markdown": "/api/v1/articles/postgresql-secure-query?format=markdown&lang=zh"
    },
    "exampleUsage": "curl \"https://buzhou.io/api/v1/articles/postgresql-secure-query?format=json&lang=zh\""
  }
}