↑↓ 选择↵ 打开⌫ 切换范围完整搜索

PG.CENTER 连接 PostgreSQL 文档、百科与生态知识。由 Pigsty 维护。

Wiki / SQLSTATE

42501 — 权限不足(insufficient_privilege)

当前角色对目标对象的权限不足。

英文手册覆盖始于 PostgreSQL 8.1. 来源历史与运行验证各自保留独立版本边界。

当前阅读 PG 18·选择有来源记录的版本

aliases
未知
class name
Syntax Error or Access Rule Violation
condition name
insufficient_privilege
lang
en
sqlstate
42501

版本定义 PG 18

42501 — 权限不足

速览 {#at-a-glance}

SQLSTATE 42501 是 Class 42 中的 insufficient_privilege。42501 表示权限不足。选定的自然路径让另一个角色在只有 schema USAGE、没有 sequence USAGE 时调用 runner 自有序列的 nextval,服务器报告 permission denied for sequence %s。

含义 {#meaning}

42501 表示权限不足。在选定路径中,nextval 进入 nextval_internal,先按有效的 GetUserId() 检查序列访问权限,再推进序列。schema 的 USAGE 只允许受限角色解析该 schema 中的对象,并不会授予本次调用所需的序列权限,因此服务器发出 ERROR 主报文 permission denied for sequence %s;其中序列名是动态值。

这里的 owner 边界很重要:owner 或管理员连接负责准备一次性 schema 和序列,另一个受限角色连接负责执行 nextval。实际修复是由 owner/管理员连接窄授 GRANT USAGE ON SEQUENCE ...,再让同一个受限角色重试;这不表示受限角色可以自行给自己授权。

同一 SQLSTATE 还覆盖其他权限边界。通用 ACL 检查器可以报告 permission denied for relation %s、permission denied for schema %s 或列级形式;只允许 owner 的操作则使用 must be owner of relation %s 或相应对象类型。行级安全是执行器的另一层检查:表 ACL 通过时,INSERT 或 UPDATE 的行仍可能违反策略并报 new row violates row-level security policy ...。这些是固定源码确认的 producer 分支,不是选定序列运行的额外观察。

诊断 {#diagnosis}

检查 current_user、session_user、任何 SET ROLE、数据库、schema、准确关系或列,以及相应 ACL。把准备/授权连接与探测连接分开:将 runner_host、runner_port、runner_db、runner_user 替换为真实一次性目标和 owner/管理员凭据,再用另一个连接以生成的受限角色(例如 syntax_role)执行 nextval。否则连接池可能让 ACL 变更看起来作用到了另一个 backend。如果主报文点名关系、schema 或列,应检查该对象的权限,而不是假设都是 sequence USAGE;must be owner 要检查对象 owner 和生效角色;RLS 主报文则要检查适用于该角色的策略 USING/WITH CHECK。选定的自动提交探测得到 ERROR 后同一探测会话仍为 IDLE;显式事务则要先按自己的错误状态处理,再继续操作。它不同于 28000 的启动授权失败和 0A000 的功能不支持。

处理 {#response}

由 owner/管理员连接只授予准确对象所需的权限(本例为 sequence USAGE),或使用应用设计所需的 owner/security-definer 或 RLS 策略。修改 ACL 后在同一个受限角色会话重试 nextval,并核对返回值和会话状态。超级用户确实会绕过 ACL,但不要把角色升为超级用户来替代有针对性的最小授权;schema USAGE、表权限和序列权限是不同检查。owner-only 失败应使用 owner/迁移角色,或有意识地变更 owner,而不是把 ACL 授权当成 owner 转移。如果涉及角色成员关系或 SET ROLE,还要检查实际生效角色。

报文 {#messages}

选定序列源码路径以 SQLSTATE 42501 发出明确的 ERROR,主报文为 permission denied for sequence %s。%s 是解析出的序列关系名;该路径没有 DETAIL 或 HINT。其他固定 ACL 分支使用 permission denied for relation %s、permission denied for schema %s 和 permission denied for column "%s" of relation "%s";owner-only 检查使用 must be owner of relation %s 或相应对象类型。RLS WITH CHECK 分支使用 new row violates row-level security policy ... 主报文。只有客户端异常而没有针对具体分支的服务器 SQLSTATE 和主报文时,不能据此识别该 42501 producer。

代表案例 {#case}

本页使用与运行器注册表相同的语句。owner/管理员连接创建序列并授予 schema USAGE;受限角色连接执行两次 nextval 探测。执行时,syntax_schema、syntax_role 等生成名称会替换为一次性实例中的实际值,runner_host、runner_port、runner_db、runner_user 等连接占位符也必须替换为真实目标,不能照抄字面值。

CREATE SEQUENCE syntax_schema.syntax_sequence START WITH 1;
GRANT USAGE ON SCHEMA syntax_schema TO syntax_role;
SELECT nextval('syntax_schema.syntax_sequence');
GRANT USAGE ON SEQUENCE syntax_schema.syntax_sequence TO syntax_role;
SELECT nextval('syntax_schema.syntax_sequence');

选定的 18.6 运行记录结构化诊断并通过修复断言;10.21 运行通过同一案例的具体检查。可下载的案例和证据投影分别是 42501 案例 JSON 和 作者证据。运行器清单为 verify/cases/42501/cases.json,页面 SQL 会与共享注册表核对。

版本 {#versions}

选定的自然运行范围是 PostgreSQL 18.6 与 10.21,不能据此推断所有中间版本的行为。

相关 {#related}

来源 {#sources}

  • src.errcodes.18.6 — fixed errcodes.txt definition at commit 724edf9bde9d356724ad384a2e196edc3c9f80f7; SHA-256 6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba (source).
  • src.sequence-permission.18.6 — src/backend/commands/sequence.c at REL_18_6 commit 724edf9bde9d356724ad384a2e196edc3c9f80f7; fixed blob SHA-256 3e5afe17d5a84862fae502a5481211220368f1d639e9d07ba6f96ee8be92a8d8 (source).
  • src.sequence-permission.10.23 — src/backend/commands/sequence.c at REL_10_23 commit 02991e79f8f58bc208f05dcc8af0c62dbe0a6ea4; fixed blob SHA-256 5510e1266e8d8c548a4318d753392e92e689d348f3353a2aa53d8dea871c44ab (source).
  • src.aclcheck-errors.18.6 / src.aclcheck-errors.10.23 — fixed src/backend/catalog/aclchk.c ACL-kind tables map no-privilege and not-owner results to relation/schema/column messages; blob SHA-256 9700258318959b47c42edb423418fb511dd3a008023e732f601eecf4c80868f8 / 3a4330bd55ea8c0ec12324d7046ec31d64c920f99196235b84612d6cd1a4b26c (18.6 source, 10.23 source).
  • src.rls-errors.18.6 / src.rls-errors.10.23 — fixed src/backend/executor/execMain.c row-level security WITH CHECK errors; blob SHA-256 33b97337fa23a649c5e7a092e1bd405a54e8503529236c62c9d5bb93a1774a8d / 386d09f7e964ebc426a554cf51ac7cb505c67cc95b971ee7acad1a6e0a9d0c1a (18.6 source, 10.23 source).
  • src.calls.REL_18_6 / src.calls.REL_10_23 — fixed call scans, SHA-256 9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf / 00d16d3eb01b71ccf1b245c8f3102f9d0ec9f36fb02777b8dd1b99fcb263040c.

比较版本

SQLSTATE 证据与已记录的运行版本

cases · permission_denied_sequence
{
  "assertions": [
    "SQLSTATE is 42501 with sequence privilege diagnostic",
    "The denied role session remains IDLE",
    "Granting sequence USAGE permits nextval and returns the first value"
  ],
  "case_id": "permission_denied_sequence",
  "cleanup": "Drop the case schema and temporary role with an owner connection.",
  "has_snippet": true,
  "position": 0,
  "preconditions": [
    "A runner-owned disposable target is provisioned.",
    "The runner can create a login role and grant schema/table privileges."
  ],
  "repair": "Grant only the required sequence privilege or change the owning role policy, then retry nextval on the same role session.",
  "trigger": "Create a sequence, grant schema usage but no sequence privilege, then call nextval as a separate role.",
  "versions": [
    "10",
    "18"
  ]
}
claims · identity.class-and-condition
{
  "claim_id": "identity.class-and-condition",
  "limits": "Directory identity does not identify every backend path.",
  "method": "Read fixed errcodes.txt and the locked catalogue metadata.",
  "position": 0,
  "runtime": [],
  "sources": [
    "src.errcodes.18.6"
  ],
  "statement": "42501 is the insufficient_privilege condition in Class 42."
}
claims · mechanism.backend-path
{
  "claim_id": "mechanism.backend-path",
  "limits": "Other calls can use the same SQLSTATE with different context or dynamic fields.",
  "method": "Trace the resolved REL_18_6 and REL_10_23 source call records at the locked commits.",
  "position": 1,
  "runtime": [],
  "sources": [
    "src.sequence-permission.18.6",
    "src.sequence-permission.10.23",
    "src.aclcheck-errors.18.6",
    "src.aclcheck-errors.10.23",
    "src.rls-errors.18.6",
    "src.rls-errors.10.23"
  ],
  "statement": "The fixed source calls for 42501 include the mechanism and message boundary selected for this page."
}
claims · mechanism.object-privilege-branches
{
  "claim_id": "mechanism.object-privilege-branches",
  "limits": "These source paths are not additional runtime observations; the selected runtime remains the sequence ACL case.",
  "method": "Read the fixed aclcheck_error tables and executor row-security error branches at REL_18_6 and REL_10_23.",
  "position": 2,
  "runtime": [],
  "sources": [
    "src.aclcheck-errors.18.6",
    "src.aclcheck-errors.10.23",
    "src.rls-errors.18.6",
    "src.rls-errors.10.23"
  ],
  "statement": "Fixed 42501 branches also cover relation/schema/column ACL failures, owner-only checks, and row-level security WITH CHECK failures with different primaries."
}
claims · runtime.representative-case
{
  "claim_id": "runtime.representative-case",
  "limits": "This covers the selected case and targets only; it does not generalize to all drivers or intermediate releases.",
  "method": "Run the shared registry case and inspect structured diagnostics, state/recovery assertions, and cleanup.",
  "position": 3,
  "runtime": [
    "runtime.42501-syntax-latest-test2.latest",
    "runtime.42501-syntax-pg10.pg10"
  ],
  "sources": [
    "manifest.42501",
    "snippet-registry.42501"
  ],
  "statement": "The selected permission_denied_sequence case passed on isolated PostgreSQL 18.6 and 10.21 targets."
}
claims · versions.catalogue-boundary
{
  "claim_id": "versions.catalogue-boundary",
  "limits": "Definition presence is not an exact behavioral introduction.",
  "method": "Read generated facts and selected summaries.",
  "position": 4,
  "runtime": [],
  "sources": [
    "src.errcodes.18.6",
    "src.calls.REL_18_6",
    "src.calls.REL_10_23"
  ],
  "statement": "The locked catalogue records 42501; runtime scope is limited to the selected targets."
}
messages · message.sequence-permission
{
  "limits": "",
  "message_id": "message.sequence-permission",
  "path": "",
  "position": 0,
  "raw": {
    "id": "message.sequence-permission",
    "primary_template": "permission denied for sequence %s",
    "severity_source": "explicit ERROR",
    "sources": [
      "src.sequence-permission.18.6",
      "src.sequence-permission.10.23"
    ],
    "sqlstate": "42501"
  },
  "severity": "explicit ERROR",
  "sources": [
    "src.sequence-permission.18.6",
    "src.sequence-permission.10.23"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "permission denied for sequence",
      "position": 0,
      "role": "",
      "template": "permission denied for sequence %s"
    }
  ]
}
messages · message.acl-relation-schema-owner
{
  "limits": "Generic ACL and owner-only source branches; no concrete runtime value is claimed.",
  "message_id": "message.acl-relation-schema-owner",
  "path": "",
  "position": 1,
  "raw": {
    "id": "message.acl-relation-schema-owner",
    "limits": "Generic ACL and owner-only source branches; no concrete runtime value is claimed.",
    "primary_variants": [
      "permission denied for relation %s",
      "permission denied for schema %s",
      "permission denied for column \"%s\" of relation \"%s\"",
      "must be owner of relation %s",
      "must be owner of schema %s"
    ],
    "severity_source": "explicit ERROR",
    "sources": [
      "src.aclcheck-errors.18.6",
      "src.aclcheck-errors.10.23"
    ],
    "sqlstate": "42501"
  },
  "severity": "explicit ERROR",
  "sources": [
    "src.aclcheck-errors.18.6",
    "src.aclcheck-errors.10.23"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "permission denied for relation",
      "position": 0,
      "role": "",
      "template": "permission denied for relation %s"
    },
    {
      "kind": "primary",
      "literal": "permission denied for schema",
      "position": 1,
      "role": "",
      "template": "permission denied for schema %s"
    },
    {
      "kind": "primary",
      "literal": "permission denied for column \" \" of relation \" \"",
      "position": 2,
      "role": "",
      "template": "permission denied for column \"%s\" of relation \"%s\""
    },
    {
      "kind": "primary",
      "literal": "must be owner of relation",
      "position": 3,
      "role": "",
      "template": "must be owner of relation %s"
    },
    {
      "kind": "primary",
      "literal": "must be owner of schema",
      "position": 4,
      "role": "",
      "template": "must be owner of schema %s"
    }
  ]
}
messages · message.rls-with-check
{
  "limits": "Fixed executor WITH CHECK branches; no concrete RLS runtime is claimed.",
  "message_id": "message.rls-with-check",
  "path": "",
  "position": 2,
  "raw": {
    "id": "message.rls-with-check",
    "limits": "Fixed executor WITH CHECK branches; no concrete RLS runtime is claimed.",
    "primary_variants": [
      "new row violates row-level security policy \"%s\" for table \"%s\"",
      "new row violates row-level security policy for table \"%s\"",
      "new row violates row-level security policy \"%s\" (USING expression) for table \"%s\"",
      "new row violates row-level security policy (USING expression) for table \"%s\""
    ],
    "severity_source": "explicit ERROR",
    "sources": [
      "src.rls-errors.18.6",
      "src.rls-errors.10.23"
    ],
    "sqlstate": "42501"
  },
  "severity": "explicit ERROR",
  "sources": [
    "src.rls-errors.18.6",
    "src.rls-errors.10.23"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "new row violates row-level security policy \" \" for table \" \"",
      "position": 0,
      "role": "",
      "template": "new row violates row-level security policy \"%s\" for table \"%s\""
    },
    {
      "kind": "primary",
      "literal": "new row violates row-level security policy for table \" \"",
      "position": 1,
      "role": "",
      "template": "new row violates row-level security policy for table \"%s\""
    },
    {
      "kind": "primary",
      "literal": "new row violates row-level security policy \" \" (USING expression) for table \" \"",
      "position": 2,
      "role": "",
      "template": "new row violates row-level security policy \"%s\" (USING expression) for table \"%s\""
    },
    {
      "kind": "primary",
      "literal": "new row violates row-level security policy (USING expression) for table \" \"",
      "position": 3,
      "role": "",
      "template": "new row violates row-level security policy (USING expression) for table \"%s\""
    }
  ]
}
runtimes · runtime.42501-syntax-latest-test2.latest · 18.6 (Homebrew) · passed
{
  "cases": [],
  "limits": "",
  "position": 0,
  "raw": {
    "assertions": [
      {
        "expected": "42501",
        "name": "42501 SQLSTATE",
        "observed": "42501",
        "passed": true
      },
      {
        "expected": "ERROR",
        "name": "42501 ERROR severity",
        "observed": "ERROR",
        "passed": true
      },
      {
        "expected": "permission denied for sequence permission_sequence",
        "name": "42501 primary diagnostic",
        "observed": "permission denied for sequence permission_sequence",
        "passed": true
      },
      {
        "expected": "IDLE",
        "name": "sequence privilege denial leaves session usable",
        "observed": "IDLE",
        "passed": true
      },
      {
        "expected": {
          "status": "IDLE",
          "value": 1
        },
        "name": "narrow grant repairs the same nextval",
        "observed": {
          "status": "IDLE",
          "value": 1
        },
        "passed": true
      }
    ],
    "case_manifest": {
      "id": "manifest.42501",
      "kind": "local_artifact",
      "path": "verify/cases/42501/cases.json",
      "sha256": "63f32b62a86fc78ba7c882dd0f74d4c7f7b5c15fcdd33172520fcf4dfc1b4bc1",
      "source_role": "case_manifest"
    },
    "cleanup": {
      "errors": [],
      "passed": true
    },
    "environment": {
      "TimeZone": "Asia/Shanghai",
      "backend_pid": 966,
      "binary": {
        "bindir": "/opt/homebrew/Cellar/postgresql@18/18.6/bin",
        "pg_config": "/opt/homebrew/bin/pg_config",
        "pg_config_version": "PostgreSQL 18.6 (Homebrew)",
        "postgres": "/opt/homebrew/Cellar/postgresql@18/18.6/bin/postgres"
      },
      "connection_scope": "runner-owned localhost port",
      "current_user": "runner",
      "docker": {},
      "lc_messages": "C",
      "libpq_version": "18.6",
      "locale": "en_US.UTF-8",
      "log_destination": "csvlog,jsonlog",
      "log_error_verbosity": "verbose",
      "log_min_error_statement": "error",
      "log_min_messages": "error",
      "logging_collector": "on",
      "machine": "arm64",
      "max_connections": "100",
      "platform": "macOS-26.6.2-arm64-arm-64bit-Mach-O",
      "psycopg_version": "3.3.5",
      "python_version": "3.14.6 (main, Jun 10 2026, 10:03:53) [Clang 21.0.0 (clang-2100.0.123.102)]",
      "server_encoding": "UTF8",
      "server_version": "18.6 (Homebrew)",
      "server_version_num": "180006",
      "target_kind": "latest",
      "wal_level": "logical"
    },
    "id": "runtime.42501-syntax-latest-test2.latest",
    "observed": {
      "connection_autocommit": true,
      "denied_status": "IDLE",
      "diagnostic": {
        "column_name": null,
        "constraint_name": null,
        "context": null,
        "datatype_name": null,
        "exception_type": "InsufficientPrivilege",
        "internal_position": null,
        "internal_query": null,
        "message_detail": null,
        "message_hint": null,
        "message_primary": "permission denied for sequence permission_sequence",
        "schema_name": null,
        "severity": "ERROR",
        "severity_nonlocalized": "ERROR",
        "source_file": "sequence.c",
        "source_function": "nextval_internal",
        "source_line": "655",
        "sqlstate": "42501",
        "statement_position": null,
        "table_name": null,
        "text": "permission denied for sequence permission_sequence"
      },
      "repair": {
        "granted_sequence_privilege": "USAGE",
        "status": "IDLE",
        "value": 1
      },
      "role": "u42501_d61b41bcce"
    },
    "raw": "verify/results/42501-syntax-latest-test2/latest/raw.jsonl",
    "raw_sha256": "1f3a8a70f8b5788ea5c82f341c6cd55e8d84057a2905ae26c4c747dd14f0b280",
    "run_id": "42501-syntax-latest-test2",
    "server_version": "18.6 (Homebrew)",
    "server_version_num": 180006,
    "snippet_registry": {
      "id": "snippet-registry.42501",
      "kind": "local_artifact",
      "path": "verify/cases/42501/snippets.json",
      "sha256": "1c312de470921306bf563e8efc0ceafc2aed04f4096aeb28f7e471ec9b246a0d",
      "source_role": "snippet_registry"
    },
    "status": "passed",
    "summary": "verify/results/42501-syntax-latest-test2/latest/summary.json",
    "summary_sha256": "9b20c17b31dfdfa581355803aa96f061a5fa4ec674de7b7bdf246879879e26c4",
    "target": "latest"
  },
  "run_id": "42501-syntax-latest-test2",
  "runtime_id": "runtime.42501-syntax-latest-test2.latest",
  "server_version": "18.6 (Homebrew)",
  "status": "passed",
  "target": "latest"
}
runtimes · runtime.42501-syntax-pg10.pg10 · 10.21 (Debian 10.21-1.pgdg90+1) · passed
{
  "cases": [],
  "limits": "",
  "position": 1,
  "raw": {
    "assertions": [
      {
        "expected": "42501",
        "name": "42501 SQLSTATE",
        "observed": "42501",
        "passed": true
      },
      {
        "expected": "ERROR",
        "name": "42501 ERROR severity",
        "observed": "ERROR",
        "passed": true
      },
      {
        "expected": "permission denied for sequence permission_sequence",
        "name": "42501 primary diagnostic",
        "observed": "permission denied for sequence permission_sequence",
        "passed": true
      },
      {
        "expected": "IDLE",
        "name": "sequence privilege denial leaves session usable",
        "observed": "IDLE",
        "passed": true
      },
      {
        "expected": {
          "status": "IDLE",
          "value": 1
        },
        "name": "narrow grant repairs the same nextval",
        "observed": {
          "status": "IDLE",
          "value": 1
        },
        "passed": true
      }
    ],
    "case_manifest": {
      "id": "manifest.42501",
      "kind": "local_artifact",
      "path": "verify/cases/42501/cases.json",
      "sha256": "63f32b62a86fc78ba7c882dd0f74d4c7f7b5c15fcdd33172520fcf4dfc1b4bc1",
      "source_role": "case_manifest"
    },
    "cleanup": {
      "errors": [],
      "passed": true
    },
    "environment": {
      "TimeZone": "Etc/UTC",
      "backend_pid": 78,
      "binary": {},
      "connection_scope": "runner-owned localhost port",
      "current_user": "postgres",
      "docker": {
        "architecture": "arm64",
        "command": "/usr/local/bin/docker",
        "digest": "sha256:b2baf8998630663d21370da06387c950e587071bdd307ee34e661cdcc7442bcc",
        "id": "sha256:b2baf8998630663d21370da06387c950e587071bdd307ee34e661cdcc7442bcc",
        "image": "postgres:10",
        "image_created": "2022-06-23T09:11:18.374607054Z",
        "image_ref": "postgres@sha256:b2baf8998630663d21370da06387c950e587071bdd307ee34e661cdcc7442bcc",
        "log_destination": "csvlog",
        "os": "linux",
        "repo_digests": [
          "postgres@sha256:b2baf8998630663d21370da06387c950e587071bdd307ee34e661cdcc7442bcc"
        ]
      },
      "lc_messages": "en_US.utf8",
      "libpq_version": "18.6",
      "locale": "en_US.UTF-8",
      "log_destination": "csvlog",
      "log_error_verbosity": "verbose",
      "log_min_error_statement": "error",
      "log_min_messages": "error",
      "logging_collector": "on",
      "machine": "arm64",
      "max_connections": "100",
      "platform": "macOS-26.6.2-arm64-arm-64bit-Mach-O",
      "psycopg_version": "3.3.5",
      "python_version": "3.14.6 (main, Jun 10 2026, 10:03:53) [Clang 21.0.0 (clang-2100.0.123.102)]",
      "server_encoding": "UTF8",
      "server_version": "10.21 (Debian 10.21-1.pgdg90+1)",
      "server_version_num": "100021",
      "target_kind": "pg10",
      "wal_level": "logical"
    },
    "id": "runtime.42501-syntax-pg10.pg10",
    "observed": {
      "connection_autocommit": true,
      "denied_status": "IDLE",
      "diagnostic": {
        "column_name": null,
        "constraint_name": null,
        "context": null,
        "datatype_name": null,
        "exception_type": "InsufficientPrivilege",
        "internal_position": null,
        "internal_query": null,
        "message_detail": null,
        "message_hint": null,
        "message_primary": "permission denied for sequence permission_sequence",
        "schema_name": null,
        "severity": "ERROR",
        "severity_nonlocalized": "ERROR",
        "source_file": "sequence.c",
        "source_function": "nextval_internal",
        "source_line": "600",
        "sqlstate": "42501",
        "statement_position": null,
        "table_name": null,
        "text": "permission denied for sequence permission_sequence"
      },
      "repair": {
        "granted_sequence_privilege": "USAGE",
        "status": "IDLE",
        "value": 1
      },
      "role": "u42501_523bc1d1a0"
    },
    "raw": "verify/results/42501-syntax-pg10/pg10/raw.jsonl",
    "raw_sha256": "eb589204bc3513ee29e02f02861a7ed77b0dcf1fe162a2fded332d5e3708f999",
    "run_id": "42501-syntax-pg10",
    "server_version": "10.21 (Debian 10.21-1.pgdg90+1)",
    "server_version_num": 100021,
    "snippet_registry": {
      "id": "snippet-registry.42501",
      "kind": "local_artifact",
      "path": "verify/cases/42501/snippets.json",
      "sha256": "1c312de470921306bf563e8efc0ceafc2aed04f4096aeb28f7e471ec9b246a0d",
      "source_role": "snippet_registry"
    },
    "status": "passed",
    "summary": "verify/results/42501-syntax-pg10/pg10/summary.json",
    "summary_sha256": "09348bf061a25fb7a37fa703206db34e0769ade791b6a46ae42c92e515a805c4",
    "target": "pg10"
  },
  "run_id": "42501-syntax-pg10",
  "runtime_id": "runtime.42501-syntax-pg10.pg10",
  "server_version": "10.21 (Debian 10.21-1.pgdg90+1)",
  "status": "passed",
  "target": "pg10"
}
sources · src.errcodes.18.6
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/utils/errcodes.txt",
  "position": 0,
  "sha256": "6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba",
  "source_id": "src.errcodes.18.6",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt"
}
sources · src.calls.REL_18_6
{
  "commit": "",
  "docs_url": "",
  "kind": "local_artifact",
  "location": "",
  "path": "raw/calls/REL_18_6.jsonl",
  "position": 1,
  "sha256": "9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf",
  "source_id": "src.calls.REL_18_6",
  "tag": "",
  "url": ""
}
sources · src.calls.REL_10_23
{
  "commit": "",
  "docs_url": "",
  "kind": "local_artifact",
  "location": "",
  "path": "raw/calls/REL_10_23.jsonl",
  "position": 2,
  "sha256": "00d16d3eb01b71ccf1b245c8f3102f9d0ec9f36fb02777b8dd1b99fcb263040c",
  "source_id": "src.calls.REL_10_23",
  "tag": "",
  "url": ""
}
sources · src.sequence-permission.18.6
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/commands/sequence.c",
  "position": 3,
  "sha256": "3e5afe17d5a84862fae502a5481211220368f1d639e9d07ba6f96ee8be92a8d8",
  "source_id": "src.sequence-permission.18.6",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/sequence.c#L652-L655"
}
sources · src.sequence-permission.10.23
{
  "commit": "02991e79f8f58bc208f05dcc8af0c62dbe0a6ea4",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/commands/sequence.c",
  "position": 4,
  "sha256": "5510e1266e8d8c548a4318d753392e92e689d348f3353a2aa53d8dea871c44ab",
  "source_id": "src.sequence-permission.10.23",
  "tag": "REL_10_23",
  "url": "https://github.com/postgres/postgres/blob/02991e79f8f58bc208f05dcc8af0c62dbe0a6ea4/src/backend/commands/sequence.c#L605-L608"
}
sources · src.aclcheck-errors.18.6
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/catalog/aclchk.c",
  "position": 5,
  "sha256": "9700258318959b47c42edb423418fb511dd3a008023e732f601eecf4c80868f8",
  "source_id": "src.aclcheck-errors.18.6",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/catalog/aclchk.c#L2793-L2795"
}
sources · src.aclcheck-errors.10.23
{
  "commit": "02991e79f8f58bc208f05dcc8af0c62dbe0a6ea4",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/catalog/aclchk.c",
  "position": 6,
  "sha256": "3a4330bd55ea8c0ec12324d7046ec31d64c920f99196235b84612d6cd1a4b26c",
  "source_id": "src.aclcheck-errors.10.23",
  "tag": "REL_10_23",
  "url": "https://github.com/postgres/postgres/blob/02991e79f8f58bc208f05dcc8af0c62dbe0a6ea4/src/backend/catalog/aclchk.c#L3301-L3449"
}
sources · src.rls-errors.18.6
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/executor/execMain.c",
  "position": 7,
  "sha256": "33b97337fa23a649c5e7a092e1bd405a54e8503529236c62c9d5bb93a1774a8d",
  "source_id": "src.rls-errors.18.6",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/executor/execMain.c#L2332-L2365"
}
sources · src.rls-errors.10.23
{
  "commit": "02991e79f8f58bc208f05dcc8af0c62dbe0a6ea4",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/executor/execMain.c",
  "position": 8,
  "sha256": "386d09f7e964ebc426a554cf51ac7cb505c67cc95b971ee7acad1a6e0a9d0c1a",
  "source_id": "src.rls-errors.10.23",
  "tag": "REL_10_23",
  "url": "https://github.com/postgres/postgres/blob/02991e79f8f58bc208f05dcc8af0c62dbe0a6ea4/src/backend/executor/execMain.c#L2188-L2208"
}
sources · manifest.42501
{
  "commit": "",
  "docs_url": "",
  "kind": "local_artifact",
  "location": "",
  "path": "verify/cases/42501/cases.json",
  "position": 9,
  "sha256": "63f32b62a86fc78ba7c882dd0f74d4c7f7b5c15fcdd33172520fcf4dfc1b4bc1",
  "source_id": "manifest.42501",
  "tag": "",
  "url": ""
}
sources · snippet-registry.42501
{
  "commit": "",
  "docs_url": "",
  "kind": "local_artifact",
  "location": "",
  "path": "verify/cases/42501/snippets.json",
  "position": 10,
  "sha256": "1c312de470921306bf563e8efc0ceafc2aed04f4096aeb28f7e471ec9b246a0d",
  "source_id": "snippet-registry.42501",
  "tag": "",
  "url": ""
}

来源引用

完整定义与证据 JSON

定义来源

center · PostgreSQL 18 · english-manuals:bfad61195ddd188f946cccc6369bdd417ae83cd7d95483b6df8d24af7c1f767a

正文语言: zh-Hans · english-manuals:bfad61195ddd188f946cccc6369bdd417ae83cd7d95483b6df8d24af7c1f767a