{"Entry":{"collection":"sqlstate","key":"58P03","name":"58P03","aliases":[],"metadata":{"aliases":[],"case_count":0,"class_code":"58","condition_name":"file_name_too_long","condition_names":["file_name_too_long"],"content_hash":"1076824e3384e7d39db584262ef99ba65ddb86cb768bcce32b04d8b53537b052","depth":"full","editorial_review":"reviewed","evidence_tier":"source_path_confirmed","imported_at":"2026-09-30T17:45:27.960133+08:00","introduced":null,"known_present_by":"18.0","macros":["ERRCODE_FILE_NAME_TOO_LONG"],"name_zh":"","present_in":["18","19"],"preview_in":["19"],"primary_macro":"ERRCODE_FILE_NAME_TOO_LONG","removed":null,"runtime_verification":"not_run","severity_classes":["E"],"snippet_count":0,"source_rev":"english-manuals:e0ec3ffa05c398032d9d50ddbdd5191c83daa657cd37fbebd1ca5cb4e4802bf0","sqlstate":"58P03","status":"active","summary_zh":"文件访问因路径名过长失败，对应 ENAMETOOLONG。"}},"Definition":{"Collection":"sqlstate","Key":"58P03","SourceDatabase":"center","Version":"18","SourceTable":"sqlstate","SourceKey":"58P03","SourceRevision":"english-manuals:e0ec3ffa05c398032d9d50ddbdd5191c83daa657cd37fbebd1ca5cb4e4802bf0","Facts":{"aliases":[],"class_name":"System Error (errors external to PostgreSQL itself)","condition_name":"file_name_too_long","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"56dacf78e618ff0fd8c533e05db597b80d7ebbad7f8e512a888217d0640aa328","slug":"18"},"lang":"en","sqlstate":"58P03"},"ManualEvidence":{"doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"56dacf78e618ff0fd8c533e05db597b80d7ebbad7f8e512a888217d0640aa328","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"sqlstate","Key":"58P03","SourceDatabase":"center","Version":"","Locale":"zh-Hans","Title":"58P03 — file_name_too_long","Summary":"文件访问因路径名过长失败，对应 ENAMETOOLONG。","BodyHTML":"\u003ch1\u003e58P03\u003c/h1\u003e\n\u003ch2\u003e速览 {#at-a-glance}\u003c/h2\u003e\n\u003cp\u003e\u003ccode\u003e58P03\u003c/code\u003e 由 PostgreSQL 文件访问 errno 辅助函数在保存的 OS errno 为 \u003ccode\u003eENAMETOOLONG\u003c/code\u003e 时选择。它不是固定的 \u003ccode\u003efile name too long\u003c/code\u003e 主消息；调用者提供带 \u003ccode\u003e%m\u003c/code\u003e 的消息，辅助函数提供 SQLSTATE。\u003c/p\u003e\n\u003ch2\u003e含义 {#meaning}\u003c/h2\u003e\n\u003cp\u003e\u003ccode\u003eerrcode_for_file_access()\u003c/code\u003e 将 \u003ccode\u003eENAMETOOLONG\u003c/code\u003e 映射为 \u003ccode\u003eERRCODE_FILE_NAME_TOO_LONG\u003c/code\u003e。同一完整 switch 还把 \u003ccode\u003eENOENT\u003c/code\u003e 映射为 \u003ccode\u003e58P01\u003c/code\u003e、\u003ccode\u003eEEXIST\u003c/code\u003e 映射为 \u003ccode\u003e58P02\u003c/code\u003e、\u003ccode\u003eENOSPC\u003c/code\u003e 映射为 \u003ccode\u003e53100\u003c/code\u003e、\u003ccode\u003eEIO\u003c/code\u003e 映射为 \u003ccode\u003e58030\u003c/code\u003e，其他 errno 可能落到别的代码。辅助函数明确要求调用者的主消息保留 \u003ccode\u003e%m\u003c/code\u003e，所以 OS 文本和 locale（区域设置）是诊断的一部分。\u003c/p\u003e\n\u003cp\u003e18.6 固定后端调用者包括 base backup 的 \u003ccode\u003ecould not access directory \u0026#34;%s\u0026#34;: %m\u003c/code\u003e 和表空间的 \u003ccode\u003ecould not set permissions on directory \u0026#34;%s\u0026#34;: %m\u003c/code\u003e；两者先以 \u003ccode\u003eERROR\u003c/code\u003e 发出，再由辅助函数选择代码。这说明实际操作上下文很重要：同一 SQLSTATE 可以来自不同文件操作，其他调用者的文件名过长也可能使用不同主消息模板。\u003c/p\u003e\n\u003ch2\u003e消息 {#messages}\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cstrong\u003eERROR\u003c/strong\u003e，base backup 代表主消息：\u003ccode\u003ecould not access directory \u0026#34;%s\u0026#34;: %m\u003c/code\u003e。\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eERROR\u003c/strong\u003e，表空间代表主消息：\u003ccode\u003ecould not set permissions on directory \u0026#34;%s\u0026#34;: %m\u003c/code\u003e。\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003e%m\u003c/code\u003e 展开为保存的 OS 错误文本；若 errno 是 \u003ccode\u003eENAMETOOLONG\u003c/code\u003e，\u003ccode\u003eerrcode_for_file_access()\u003c/code\u003e 提供 SQLSTATE \u003ccode\u003e58P03\u003c/code\u003e。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e本次核验没有找到脱离调用者的固定 \u003ccode\u003e58P03\u003c/code\u003e 主消息。不要把 \u003ccode\u003e%m\u003c/code\u003e 换成臆造的英文句子，也不要仅凭条件名推断扩展报文。\u003c/p\u003e\n\u003ch2\u003e诊断 {#diagnosis}\u003c/h2\u003e\n\u003cp\u003e保留完整主消息/详细信息/上下文、操作和组件、完整路径、OS errno、文件系统限制、编码及 PostgreSQL 对象名映射。区分文件系统组件长度限制与 PostgreSQL 标识符限制，也要区分辅助函数的 \u003ccode\u003eENAMETOOLONG\u003c/code\u003e 分支和 \u003ccode\u003eENOENT\u003c/code\u003e、\u003ccode\u003eEEXIST\u003c/code\u003e、磁盘满、I/O 分支。固定源码确认的是辅助函数与代表调用者，不声称在特定主机自然复现。\u003c/p\u003e\n\u003ch2\u003e处理 {#response}\u003c/h2\u003e\n\u003cp\u003e使用组件和文件系统接受的路径/名称，或移动目标并保留持久映射。客户端 \u003ccode\u003eERROR\u003c/code\u003e 若发生在显式事务中，继续执行前必须 \u003ccode\u003eROLLBACK\u003c/code\u003e 或回到已有保存点；修正路径后重试受影响操作，不要继续发送无关语句。启动/后台调用可能没有客户端事务；后端已终止时使用新连接。上报时保留原始 OS 详细信息。\u003c/p\u003e\n\u003ch2\u003e版本 {#versions}\u003c/h2\u003e\n\u003cp\u003e锁定目录从 18.0 记录 \u003ccode\u003e58P03\u003c/code\u003e；固定辅助函数与调用者来自 PostgreSQL 18.6。本页仅源码复核，没有自然运行声明。\u003c/p\u003e\n\u003ch2\u003e相关 {#related}\u003c/h2\u003e\n\u003cp\u003e\u003ca href=\"/wiki/sqlstate/58P01/\" rel=\"nofollow\"\u003e\u003ccode\u003e58P01\u003c/code\u003e\u003c/a\u003e、\u003ca href=\"/wiki/sqlstate/58P02/\" rel=\"nofollow\"\u003e\u003ccode\u003e58P02\u003c/code\u003e\u003c/a\u003e、\u003ca href=\"/wiki/sqlstate/58030/\" rel=\"nofollow\"\u003e\u003ccode\u003e58030\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\u003ch2\u003e来源 {#sources}\u003c/h2\u003e\n\u003cp\u003e\u003ca href=\"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/error/elog.c#L867\" rel=\"nofollow\"\u003e\u003ccode\u003esrc/backend/utils/error/elog.c#L867-L942\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/backup/basebackup_server.c#L119\" rel=\"nofollow\"\u003e\u003ccode\u003esrc/backend/backup/basebackup_server.c#L119-L124\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/tablespace.c#L606\" rel=\"nofollow\"\u003e\u003ccode\u003esrc/backend/commands/tablespace.c#L606-L618\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e结构化\u003ca href=\"#sources\" rel=\"nofollow\"\u003e证据记录\u003c/a\u003e保存 errno 映射、代表主消息与源码/运行边界。\u003c/p\u003e\n","SourceRevision":"english-manuals:e0ec3ffa05c398032d9d50ddbdd5191c83daa657cd37fbebd1ca5cb4e4802bf0","ContentHash":"511760cec9151d99322ea88fcefd6dbf499fd420abd6aefbf4b0f23073b92c8e","Payload":{"body_md":"# 58P03\n\n## 速览 {#at-a-glance}\n\n`58P03` 由 PostgreSQL 文件访问 errno 辅助函数在保存的 OS errno 为 `ENAMETOOLONG` 时选择。它不是固定的 `file name too long` 主消息；调用者提供带 `%m` 的消息，辅助函数提供 SQLSTATE。\n\n\n## 含义 {#meaning}\n\n`errcode_for_file_access()` 将 `ENAMETOOLONG` 映射为 `ERRCODE_FILE_NAME_TOO_LONG`。同一完整 switch 还把 `ENOENT` 映射为 `58P01`、`EEXIST` 映射为 `58P02`、`ENOSPC` 映射为 `53100`、`EIO` 映射为 `58030`，其他 errno 可能落到别的代码。辅助函数明确要求调用者的主消息保留 `%m`，所以 OS 文本和 locale（区域设置）是诊断的一部分。\n\n18.6 固定后端调用者包括 base backup 的 `could not access directory \"%s\": %m` 和表空间的 `could not set permissions on directory \"%s\": %m`；两者先以 `ERROR` 发出，再由辅助函数选择代码。这说明实际操作上下文很重要：同一 SQLSTATE 可以来自不同文件操作，其他调用者的文件名过长也可能使用不同主消息模板。\n\n## 消息 {#messages}\n\n- **ERROR**，base backup 代表主消息：`could not access directory \"%s\": %m`。\n- **ERROR**，表空间代表主消息：`could not set permissions on directory \"%s\": %m`。\n- `%m` 展开为保存的 OS 错误文本；若 errno 是 `ENAMETOOLONG`，`errcode_for_file_access()` 提供 SQLSTATE `58P03`。\n\n本次核验没有找到脱离调用者的固定 `58P03` 主消息。不要把 `%m` 换成臆造的英文句子，也不要仅凭条件名推断扩展报文。\n\n## 诊断 {#diagnosis}\n\n保留完整主消息/详细信息/上下文、操作和组件、完整路径、OS errno、文件系统限制、编码及 PostgreSQL 对象名映射。区分文件系统组件长度限制与 PostgreSQL 标识符限制，也要区分辅助函数的 `ENAMETOOLONG` 分支和 `ENOENT`、`EEXIST`、磁盘满、I/O 分支。固定源码确认的是辅助函数与代表调用者，不声称在特定主机自然复现。\n\n## 处理 {#response}\n\n使用组件和文件系统接受的路径/名称，或移动目标并保留持久映射。客户端 `ERROR` 若发生在显式事务中，继续执行前必须 `ROLLBACK` 或回到已有保存点；修正路径后重试受影响操作，不要继续发送无关语句。启动/后台调用可能没有客户端事务；后端已终止时使用新连接。上报时保留原始 OS 详细信息。\n\n## 版本 {#versions}\n\n锁定目录从 18.0 记录 `58P03`；固定辅助函数与调用者来自 PostgreSQL 18.6。本页仅源码复核，没有自然运行声明。\n\n## 相关 {#related}\n\n[`58P01`](/wiki/sqlstate/58P01/)、[`58P02`](/wiki/sqlstate/58P02/)、[`58030`](/wiki/sqlstate/58030/)\n\n## 来源 {#sources}\n\n[`src/backend/utils/error/elog.c#L867-L942`](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/error/elog.c#L867)\n\n[`src/backend/backup/basebackup_server.c#L119-L124`](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/backup/basebackup_server.c#L119)\n\n[`src/backend/commands/tablespace.c#L606-L618`](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/tablespace.c#L606)\n\n结构化[证据记录](#sources)保存 errno 映射、代表主消息与源码/运行边界。\n","description":"PostgreSQL SQLSTATE 58P03 的源码核验与诊断参考。","is_stale":false,"name":"","sections":[{"anchor":"","heading":"","html":"\u0026lt;h1\u0026gt;58P03\u0026lt;/h1\u0026gt;"},{"anchor":"at-a-glance","heading":"速览","html":"\u003cp\u003e\u003ccode\u003e58P03\u003c/code\u003e 由 PostgreSQL 文件访问 errno 辅助函数在保存的 OS errno 为 \u003ccode\u003eENAMETOOLONG\u003c/code\u003e 时选择。它不是固定的 \u003ccode\u003efile name too long\u003c/code\u003e 主消息；调用者提供带 \u003ccode\u003e%m\u003c/code\u003e 的消息，辅助函数提供 SQLSTATE。\u003c/p\u003e"},{"anchor":"meaning","heading":"含义","html":"\u003cp\u003e\u003ccode\u003eerrcode_for_file_access()\u003c/code\u003e 将 \u003ccode\u003eENAMETOOLONG\u003c/code\u003e 映射为 \u003ccode\u003eERRCODE_FILE_NAME_TOO_LONG\u003c/code\u003e。同一完整 switch 还把 \u003ccode\u003eENOENT\u003c/code\u003e 映射为 \u003ccode\u003e58P01\u003c/code\u003e、\u003ccode\u003eEEXIST\u003c/code\u003e 映射为 \u003ccode\u003e58P02\u003c/code\u003e、\u003ccode\u003eENOSPC\u003c/code\u003e 映射为 \u003ccode\u003e53100\u003c/code\u003e、\u003ccode\u003eEIO\u003c/code\u003e 映射为 \u003ccode\u003e58030\u003c/code\u003e，其他 errno 可能落到别的代码。辅助函数明确要求调用者的主消息保留 \u003ccode\u003e%m\u003c/code\u003e，所以 OS 文本和 locale（区域设置）是诊断的一部分。\u003c/p\u003e\n\u003cp\u003e18.6 固定后端调用者包括 base backup 的 \u003ccode\u003ecould not access directory \"%s\": %m\u003c/code\u003e 和表空间的 \u003ccode\u003ecould not set permissions on directory \"%s\": %m\u003c/code\u003e；两者先以 \u003ccode\u003eERROR\u003c/code\u003e 发出，再由辅助函数选择代码。这说明实际操作上下文很重要：同一 SQLSTATE 可以来自不同文件操作，其他调用者的文件名过长也可能使用不同主消息模板。\u003c/p\u003e"},{"anchor":"messages","heading":"消息","html":"\u003cul\u003e\n\u003cli\u003e\u003cstrong\u003eERROR\u003c/strong\u003e，base backup 代表主消息：\u003ccode\u003ecould not access directory \"%s\": %m\u003c/code\u003e。\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eERROR\u003c/strong\u003e，表空间代表主消息：\u003ccode\u003ecould not set permissions on directory \"%s\": %m\u003c/code\u003e。\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003e%m\u003c/code\u003e 展开为保存的 OS 错误文本；若 errno 是 \u003ccode\u003eENAMETOOLONG\u003c/code\u003e，\u003ccode\u003eerrcode_for_file_access()\u003c/code\u003e 提供 SQLSTATE \u003ccode\u003e58P03\u003c/code\u003e。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e本次核验没有找到脱离调用者的固定 \u003ccode\u003e58P03\u003c/code\u003e 主消息。不要把 \u003ccode\u003e%m\u003c/code\u003e 换成臆造的英文句子，也不要仅凭条件名推断扩展报文。\u003c/p\u003e"},{"anchor":"diagnosis","heading":"诊断","html":"\u003cp\u003e保留完整主消息/详细信息/上下文、操作和组件、完整路径、OS errno、文件系统限制、编码及 PostgreSQL 对象名映射。区分文件系统组件长度限制与 PostgreSQL 标识符限制，也要区分辅助函数的 \u003ccode\u003eENAMETOOLONG\u003c/code\u003e 分支和 \u003ccode\u003eENOENT\u003c/code\u003e、\u003ccode\u003eEEXIST\u003c/code\u003e、磁盘满、I/O 分支。固定源码确认的是辅助函数与代表调用者，不声称在特定主机自然复现。\u003c/p\u003e"},{"anchor":"response","heading":"处理","html":"\u003cp\u003e使用组件和文件系统接受的路径/名称，或移动目标并保留持久映射。客户端 \u003ccode\u003eERROR\u003c/code\u003e 若发生在显式事务中，继续执行前必须 \u003ccode\u003eROLLBACK\u003c/code\u003e 或回到已有保存点；修正路径后重试受影响操作，不要继续发送无关语句。启动/后台调用可能没有客户端事务；后端已终止时使用新连接。上报时保留原始 OS 详细信息。\u003c/p\u003e"},{"anchor":"versions","heading":"版本","html":"\u003cp\u003e锁定目录从 18.0 记录 \u003ccode\u003e58P03\u003c/code\u003e；固定辅助函数与调用者来自 PostgreSQL 18.6。本页仅源码复核，没有自然运行声明。\u003c/p\u003e"},{"anchor":"related","heading":"相关","html":"\u003cp\u003e\u003ca href=\"/wiki/sqlstate/58P01/\"\u003e\u003ccode\u003e58P01\u003c/code\u003e\u003c/a\u003e、\u003ca href=\"/wiki/sqlstate/58P02/\"\u003e\u003ccode\u003e58P02\u003c/code\u003e\u003c/a\u003e、\u003ca href=\"/wiki/sqlstate/58030/\"\u003e\u003ccode\u003e58030\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e"},{"anchor":"sources","heading":"来源","html":"\u003cp\u003e\u003ca href=\"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/error/elog.c#L867\"\u003e\u003ccode\u003esrc/backend/utils/error/elog.c#L867-L942\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/backup/basebackup_server.c#L119\"\u003e\u003ccode\u003esrc/backend/backup/basebackup_server.c#L119-L124\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/tablespace.c#L606\"\u003e\u003ccode\u003esrc/backend/commands/tablespace.c#L606-L618\u003c/code\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e结构化\u003ca href=\"#sources\"\u003e证据记录\u003c/a\u003e保存 errno 映射、代表主消息与源码/运行边界。\u003c/p\u003e"}],"summary":"文件访问因路径名过长失败，对应 ENAMETOOLONG。","title":"58P03 — file_name_too_long","translation_source_rev":"974d1c6dd5057ec8e85b565f2d17ee4fcbf88755286a0c404bbcfc67a16678c9"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":{"aliases":[],"catalogue_notes":{"earliest_observed":"18.0","formal_scope":"9.0.0..18.6","latest_observed":"18.6","matrix_scope":["9.0.23","9.1.24","9.2.24","9.3.25","9.4.26","9.5.25","9.6.24","10.23","11.22","12.22","13.23","14.24","15.19","16.15","17.11","18.6"],"pre9_scope":{"formal_tag_count":191,"maximum_release":"8.4.22","minimum_release":"7.0.0","source_definition_count":153,"source_doc_count":153,"source_file_count":306,"source_scope":"7.4..8.4 definition files; 7.0..7.3 candidate-path source gap probes","source_tag_count":153},"pre9_status":"not_observed","preview_scope":["19beta3"]},"class":"58","class_name":"System Error (errors external to PostgreSQL itself)","condition_name":"file_name_too_long","condition_names":["file_name_too_long"],"definition_changes":[],"english_manuals":{"18":{"aliases":[],"class_name":"System Error (errors external to PostgreSQL itself)","condition_name":"file_name_too_long","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"56dacf78e618ff0fd8c533e05db597b80d7ebbad7f8e512a888217d0640aa328","slug":"18"},"lang":"en","sqlstate":"58P03"},"19":{"aliases":[],"class_name":"System Error (errors external to PostgreSQL itself)","condition_name":"file_name_too_long","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"63fb8d1aa9f494eeab9d0f8542a2b673f7746ee41ae2689d19403cb3cc425a5c","slug":"19"},"lang":"en","sqlstate":"58P03"},"20":{"aliases":[],"class_name":"System Error (errors external to PostgreSQL itself)","condition_name":"file_name_too_long","doc":{"anchor":"ERRCODES-APPENDIX","file":"errcodes-appendix.html","lang":"en","sha256":"0d3f602127cd137cf343b32d5fa78f175eeb6cdcb6353b1f6f998ede6cb7b911","slug":"devel"},"lang":"en","sqlstate":"58P03"}},"history_boundary":{"earliest_observed":"18.0","formal_tag_count":351,"gaps":[{"after":"18.6","before":"18.4","reason":"Non-adjacent release tags or a source gap; no removal is inferred."}],"latest_observed":"18.6","pre_range":{"first_observed":null,"known_lower_bound":null,"last_observed":null,"notes":"No occurrence was observed in the locked 7.4..8.4 definition files. Source gaps for 7.0..7.3 prevent a claim that the code was absent before 7.4.","scanned_formal_release_count":153,"scanned_source_scope":"7.4..8.4 definition files; 7.0..7.3 candidate-path source gap probes","source_gap_majors":["7.0","7.1","7.2","7.3"],"status":"partially_scanned"},"preview_snapshots":["19beta3"],"scanned_from":"9.0.0","scanned_to":"18.6"},"introduced":null,"known_present_by":"18.0","macros":["ERRCODE_FILE_NAME_TOO_LONG"],"manual_presence":["18","19","20"],"pre9_first_observed":null,"pre9_introduction_boundary":null,"pre9_last_observed":null,"pre9_presence_intervals":[],"pre9_status":"not_observed","presence_intervals":[{"end":"18.4","end_major":"18","end_tag":"REL_18_4","evidence_count":5,"position":0,"start":"18.0","start_major":"18","start_tag":"REL_18_0"},{"end":"18.6","end_major":"18","end_tag":"REL_18_6","evidence_count":1,"position":1,"start":"18.6","start_major":"18","start_tag":"REL_18_6"}],"present_in_snapshots":["18.6","19beta3"],"preview_in_snapshots":["19beta3"],"primary_macro":"ERRCODE_FILE_NAME_TOO_LONG","removed":null,"schema_version":2,"severity_classes":["E"],"sources":[{"blob_id":"sha256:6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba","channel":"formal","code_count":262,"commit":"3d6a828938a5fa0444275d3d2f67b64ec3199eb7","id":"postgresql:REL_18_0:src/backend/utils/errcodes.txt","major":"18","parsed_path":"raw/definitions/REL_18_0.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL_18_0.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/3d6a828938a5fa0444275d3d2f67b64ec3199eb7/src/backend/utils/errcodes.txt","record_count":268,"release":"18.0","release_date":null,"repository":"https://github.com/postgres/postgres.git","sha256":"6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba","size":33739,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL_18_0","url":"https://github.com/postgres/postgres/blob/3d6a828938a5fa0444275d3d2f67b64ec3199eb7/src/backend/utils/errcodes.txt","version":"18.0"},{"blob_id":"sha256:cadb9e83cde9a8699a7e74448891ca623af8579ccc8e11c7e533fb47cbc42f89","channel":"preview","code_count":262,"commit":"3638289fb57bdabec00deda98ee9624a35f5d66a","id":"postgresql:REL_19_BETA3:src/backend/utils/errcodes.txt","major":"19","parsed_path":"raw/definitions/REL_19_BETA3.parsed.json","path":"src/backend/utils/errcodes.txt","raw_path":"raw/definitions/REL_19_BETA3.txt","raw_url":"https://raw.githubusercontent.com/postgres/postgres/3638289fb57bdabec00deda98ee9624a35f5d66a/src/backend/utils/errcodes.txt","record_count":268,"release":"19beta3","release_date":"2026-08-13","repository":"https://github.com/postgres/postgres.git","sha256":"cadb9e83cde9a8699a7e74448891ca623af8579ccc8e11c7e533fb47cbc42f89","size":33739,"source_format":"errcodes.txt","source_role":"primary_definition","tag":"REL_19_BETA3","url":"https://github.com/postgres/postgres/blob/3638289fb57bdabec00deda98ee9624a35f5d66a/src/backend/utils/errcodes.txt","version":"19beta3"}],"sqlstate":"58P03","status":"active","usage_evidence":[{"evidence_ids":["postgresql:REL_18_0:src/backend/utils/errcodes.txt","postgresql:REL_18_1:src/backend/utils/errcodes.txt","postgresql:REL_18_2:src/backend/utils/errcodes.txt","postgresql:REL_18_3:src/backend/utils/errcodes.txt","postgresql:REL_18_4:src/backend/utils/errcodes.txt","postgresql:REL_18_6:src/backend/utils/errcodes.txt","postgresql:REL_19_BETA3:src/backend/utils/errcodes.txt"],"notes":"Presence in a PostgreSQL release definition file is established; runtime throw/use scanning is maintained separately.","scope":"release-definition-catalogue","status":"definition_only"},{"evidence_ids":[],"notes":"No occurrence was found in the locked 7.4..8.4 definition files; 7.0..7.3 source gaps remain explicit.","scope":"pre9-definition-history","status":"unknown"}]},"Evidence":[{"Kind":"claims","Ordinal":0,"ID":"identity","ServerVersion":null,"Status":null,"Payload":{"claim_id":"identity","limits":"","method":"Read locked definition snapshot.","position":0,"runtime":[],"sources":["src.errcodes.18.6"],"statement":"58P03 is file_name_too_long in SQLSTATE Class 58."}},{"Kind":"claims","Ordinal":1,"ID":"resolved-paths","ServerVersion":null,"Status":null,"Payload":{"claim_id":"resolved-paths","limits":"The helper establishes the code mapping; it does not fix one primary message for every caller or prove a natural host reproduction.","method":"Read the complete errno switch and representative caller guards.","position":1,"runtime":[],"sources":["src.path.0","src.path.1","src.path.2"],"statement":"errcode_for_file_access maps ENAMETOOLONG to ERRCODE_FILE_NAME_TOO_LONG and representative backend callers retain %m while emitting ERROR."}},{"Kind":"claims","Ordinal":2,"ID":"history","ServerVersion":null,"Status":null,"Payload":{"claim_id":"history","limits":"","method":"Use locked catalogue boundary.","position":2,"runtime":[],"sources":["src.errcodes.18.6"],"statement":"The locked catalogue records 58P03 from 18.0; it does not prove the exact introduction rationale."}},{"Kind":"messages","Ordinal":0,"ID":"message.0","ServerVersion":null,"Status":null,"Payload":{"limits":"","message_id":"message.0","path":"","position":0,"raw":{"code_selection":"errcode_for_file_access()","id":"message.0","primary_template":"could not access directory \"%s\": %m","severity_source":"ERROR","sources":["src.path.1"],"sqlstate":"58P03"},"severity":"ERROR","sources":["src.path.1"],"templates":[{"kind":"primary","literal":"could not access directory \" \":","position":0,"role":"","template":"could not access directory \"%s\": %m"}]}},{"Kind":"messages","Ordinal":1,"ID":"message.1","ServerVersion":null,"Status":null,"Payload":{"limits":"","message_id":"message.1","path":"","position":1,"raw":{"code_selection":"errcode_for_file_access()","id":"message.1","primary_template":"could not set permissions on directory \"%s\": %m","severity_source":"ERROR","sources":["src.path.2"],"sqlstate":"58P03"},"severity":"ERROR","sources":["src.path.2"],"templates":[{"kind":"primary","literal":"could not set permissions on directory \" \":","position":0,"role":"","template":"could not set permissions on directory \"%s\": %m"}]}},{"Kind":"sources","Ordinal":0,"ID":"src.errcodes.18.6","ServerVersion":null,"Status":null,"Payload":{"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#L448"}},{"Kind":"sources","Ordinal":1,"ID":"src.path.0","ServerVersion":null,"Status":null,"Payload":{"commit":"724edf9bde9d356724ad384a2e196edc3c9f80f7","docs_url":"","kind":"upstream_source","location":"","path":"src/backend/utils/error/elog.c","position":1,"sha256":"766d30a426ba1d9597657bd46fb890da3e37e4ae53a83d1245bf082ed9433c33","source_id":"src.path.0","tag":"REL_18_6","url":"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/error/elog.c#L867"}},{"Kind":"sources","Ordinal":2,"ID":"src.path.1","ServerVersion":null,"Status":null,"Payload":{"commit":"724edf9bde9d356724ad384a2e196edc3c9f80f7","docs_url":"","kind":"upstream_source","location":"","path":"src/backend/backup/basebackup_server.c","position":2,"sha256":"1447d7223926f903d27744605f9caec8a610d78a9f7a7864bb3afb6b3073ac19","source_id":"src.path.1","tag":"REL_18_6","url":"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/backup/basebackup_server.c#L119"}},{"Kind":"sources","Ordinal":3,"ID":"src.path.2","ServerVersion":null,"Status":null,"Payload":{"commit":"724edf9bde9d356724ad384a2e196edc3c9f80f7","docs_url":"","kind":"upstream_source","location":"","path":"src/backend/commands/tablespace.c","position":3,"sha256":"f0369bece6339d18cd7d4a29b5fa3010447c3b8ece235c64b0d4fbf5f96a5317","source_id":"src.path.2","tag":"REL_18_6","url":"https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/tablespace.c#L606"}}]}
