{"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":"en","Title":"58P03 — file_name_too_long","Summary":"58P03 is selected by PostgreSQL's file-access errno helper when the saved OS errno is ENAMETOOLONG. It is not a standalone fixed primary such as file name too long: the caller supplies a %m message, and the helper supplies the SQLSTATE.","BodyHTML":"\u003ch1\u003e58P03\u003c/h1\u003e\n\u003ch2\u003eAt a glance {#at-a-glance}\u003c/h2\u003e\n\u003cp\u003e\u003ccode\u003e58P03\u003c/code\u003e is selected by PostgreSQL\u0026#39;s file-access errno helper when the saved OS errno is \u003ccode\u003eENAMETOOLONG\u003c/code\u003e. It is not a standalone fixed primary such as \u003ccode\u003efile name too long\u003c/code\u003e: the caller supplies a \u003ccode\u003e%m\u003c/code\u003e message, and the helper supplies the SQLSTATE.\u003c/p\u003e\n\u003ch2\u003eMeaning {#meaning}\u003c/h2\u003e\n\u003cp\u003e\u003ccode\u003eerrcode_for_file_access()\u003c/code\u003e maps \u003ccode\u003eENAMETOOLONG\u003c/code\u003e to \u003ccode\u003eERRCODE_FILE_NAME_TOO_LONG\u003c/code\u003e. The same complete switch maps \u003ccode\u003eENOENT\u003c/code\u003e to \u003ccode\u003e58P01\u003c/code\u003e, \u003ccode\u003eEEXIST\u003c/code\u003e to \u003ccode\u003e58P02\u003c/code\u003e, \u003ccode\u003eENOSPC\u003c/code\u003e to \u003ccode\u003e53100\u003c/code\u003e, and \u003ccode\u003eEIO\u003c/code\u003e to \u003ccode\u003e58030\u003c/code\u003e; all other errno values may map elsewhere. The helper explicitly expects the caller\u0026#39;s primary message to retain \u003ccode\u003e%m\u003c/code\u003e, so the OS text and locale are part of the useful diagnosis.\u003c/p\u003e\n\u003cp\u003eFixed 18.6 backend callers include the base-backup sink\u0026#39;s \u003ccode\u003ecould not access directory \u0026#34;%s\u0026#34;: %m\u003c/code\u003e and the tablespace path\u0026#39;s \u003ccode\u003ecould not set permissions on directory \u0026#34;%s\u0026#34;: %m\u003c/code\u003e, both emitted with \u003ccode\u003eERROR\u003c/code\u003e before the helper chooses the code. These examples show why the operation context matters: the same SQLSTATE can arise from different file operations, while a file-name failure in another caller may carry a different primary template.\u003c/p\u003e\n\u003ch2\u003eMessages {#messages}\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cstrong\u003eERROR\u003c/strong\u003e, representative base-backup primary: \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, representative tablespace primary: \u003ccode\u003ecould not set permissions on directory \u0026#34;%s\u0026#34;: %m\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eThe \u003ccode\u003e%m\u003c/code\u003e expansion is the saved OS error text; when it is \u003ccode\u003eENAMETOOLONG\u003c/code\u003e, \u003ccode\u003eerrcode_for_file_access()\u003c/code\u003e supplies SQLSTATE \u003ccode\u003e58P03\u003c/code\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eThere is no fixed source-backed \u003ccode\u003e58P03\u003c/code\u003e primary independent of the caller in this review. Do not replace \u003ccode\u003e%m\u003c/code\u003e with an invented English sentence or infer an extension\u0026#39;s message from the condition name.\u003c/p\u003e\n\u003ch2\u003eDiagnosis {#diagnosis}\u003c/h2\u003e\n\u003cp\u003eCapture the complete primary/detail/context, the operation and component, the full path, operating-system errno, filesystem limits, encoding, and any PostgreSQL object-name mapping. Distinguish a filesystem component limit from PostgreSQL\u0026#39;s identifier limits, and distinguish the helper\u0026#39;s \u003ccode\u003eENAMETOOLONG\u003c/code\u003e branch from \u003ccode\u003eENOENT\u003c/code\u003e, \u003ccode\u003eEEXIST\u003c/code\u003e, disk-full, and I/O branches. The fixed source confirms the helper and representative callers; it does not claim a natural reproduction on a particular host.\u003c/p\u003e\n\u003ch2\u003eResponse {#response}\u003c/h2\u003e\n\u003cp\u003eUse a path and name accepted by the owning component and filesystem, or relocate the target while preserving a durable mapping. For a client \u003ccode\u003eERROR\u003c/code\u003e in an explicit transaction, \u003ccode\u003eROLLBACK\u003c/code\u003e or an existing savepoint is required before continuing; fix the path and retry the affected operation, not arbitrary unrelated statements. A startup/background caller may have no client transaction, and a terminated backend requires a new connection. Preserve the original OS detail when escalating the issue.\u003c/p\u003e\n\u003ch2\u003eVersions {#versions}\u003c/h2\u003e\n\u003cp\u003eThe locked catalogue records \u003ccode\u003e58P03\u003c/code\u003e from 18.0; fixed helper and caller coverage is PostgreSQL 18.6. The page is source-reviewed only and has no natural runtime claim.\u003c/p\u003e\n\u003ch2\u003eRelated {#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\u003eSources {#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\u003eThe structured \u003ca href=\"#sources\" rel=\"nofollow\"\u003eevidence record\u003c/a\u003e records the errno mapping, representative primaries, and source/runtime boundary.\u003c/p\u003e\n","SourceRevision":"english-manuals:e0ec3ffa05c398032d9d50ddbdd5191c83daa657cd37fbebd1ca5cb4e4802bf0","ContentHash":"833c21dbdb004d6c18bd4e003c339166ca5dab95c8c88fdb0ce9a9b08bdcfc55","Payload":{"body_md":"# 58P03\n\n## At a glance {#at-a-glance}\n\n`58P03` is selected by PostgreSQL's file-access errno helper when the saved OS errno is `ENAMETOOLONG`. It is not a standalone fixed primary such as `file name too long`: the caller supplies a `%m` message, and the helper supplies the SQLSTATE.\n\n\n## Meaning {#meaning}\n\n`errcode_for_file_access()` maps `ENAMETOOLONG` to `ERRCODE_FILE_NAME_TOO_LONG`. The same complete switch maps `ENOENT` to `58P01`, `EEXIST` to `58P02`, `ENOSPC` to `53100`, and `EIO` to `58030`; all other errno values may map elsewhere. The helper explicitly expects the caller's primary message to retain `%m`, so the OS text and locale are part of the useful diagnosis.\n\nFixed 18.6 backend callers include the base-backup sink's `could not access directory \"%s\": %m` and the tablespace path's `could not set permissions on directory \"%s\": %m`, both emitted with `ERROR` before the helper chooses the code. These examples show why the operation context matters: the same SQLSTATE can arise from different file operations, while a file-name failure in another caller may carry a different primary template.\n\n## Messages {#messages}\n\n- **ERROR**, representative base-backup primary: `could not access directory \"%s\": %m`.\n- **ERROR**, representative tablespace primary: `could not set permissions on directory \"%s\": %m`.\n- The `%m` expansion is the saved OS error text; when it is `ENAMETOOLONG`, `errcode_for_file_access()` supplies SQLSTATE `58P03`.\n\nThere is no fixed source-backed `58P03` primary independent of the caller in this review. Do not replace `%m` with an invented English sentence or infer an extension's message from the condition name.\n\n## Diagnosis {#diagnosis}\n\nCapture the complete primary/detail/context, the operation and component, the full path, operating-system errno, filesystem limits, encoding, and any PostgreSQL object-name mapping. Distinguish a filesystem component limit from PostgreSQL's identifier limits, and distinguish the helper's `ENAMETOOLONG` branch from `ENOENT`, `EEXIST`, disk-full, and I/O branches. The fixed source confirms the helper and representative callers; it does not claim a natural reproduction on a particular host.\n\n## Response {#response}\n\nUse a path and name accepted by the owning component and filesystem, or relocate the target while preserving a durable mapping. For a client `ERROR` in an explicit transaction, `ROLLBACK` or an existing savepoint is required before continuing; fix the path and retry the affected operation, not arbitrary unrelated statements. A startup/background caller may have no client transaction, and a terminated backend requires a new connection. Preserve the original OS detail when escalating the issue.\n\n## Versions {#versions}\n\nThe locked catalogue records `58P03` from 18.0; fixed helper and caller coverage is PostgreSQL 18.6. The page is source-reviewed only and has no natural runtime claim.\n\n## Related {#related}\n\n[`58P01`](/wiki/sqlstate/58P01/), [`58P02`](/wiki/sqlstate/58P02/), [`58030`](/wiki/sqlstate/58030/)\n\n## Sources {#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\nThe structured [evidence record](#sources) records the errno mapping, representative primaries, and source/runtime boundary.\n","description":"Source-backed full reference for PostgreSQL SQLSTATE 58P03.","is_stale":false,"name":"","sections":[{"anchor":"","heading":"","html":"\u0026lt;h1\u0026gt;58P03\u0026lt;/h1\u0026gt;"},{"anchor":"at-a-glance","heading":"At a glance","html":"\u003cp\u003e\u003ccode\u003e58P03\u003c/code\u003e is selected by PostgreSQL's file-access errno helper when the saved OS errno is \u003ccode\u003eENAMETOOLONG\u003c/code\u003e. It is not a standalone fixed primary such as \u003ccode\u003efile name too long\u003c/code\u003e: the caller supplies a \u003ccode\u003e%m\u003c/code\u003e message, and the helper supplies the SQLSTATE.\u003c/p\u003e"},{"anchor":"meaning","heading":"Meaning","html":"\u003cp\u003e\u003ccode\u003eerrcode_for_file_access()\u003c/code\u003e maps \u003ccode\u003eENAMETOOLONG\u003c/code\u003e to \u003ccode\u003eERRCODE_FILE_NAME_TOO_LONG\u003c/code\u003e. The same complete switch maps \u003ccode\u003eENOENT\u003c/code\u003e to \u003ccode\u003e58P01\u003c/code\u003e, \u003ccode\u003eEEXIST\u003c/code\u003e to \u003ccode\u003e58P02\u003c/code\u003e, \u003ccode\u003eENOSPC\u003c/code\u003e to \u003ccode\u003e53100\u003c/code\u003e, and \u003ccode\u003eEIO\u003c/code\u003e to \u003ccode\u003e58030\u003c/code\u003e; all other errno values may map elsewhere. The helper explicitly expects the caller's primary message to retain \u003ccode\u003e%m\u003c/code\u003e, so the OS text and locale are part of the useful diagnosis.\u003c/p\u003e\n\u003cp\u003eFixed 18.6 backend callers include the base-backup sink's \u003ccode\u003ecould not access directory \"%s\": %m\u003c/code\u003e and the tablespace path's \u003ccode\u003ecould not set permissions on directory \"%s\": %m\u003c/code\u003e, both emitted with \u003ccode\u003eERROR\u003c/code\u003e before the helper chooses the code. These examples show why the operation context matters: the same SQLSTATE can arise from different file operations, while a file-name failure in another caller may carry a different primary template.\u003c/p\u003e"},{"anchor":"messages","heading":"Messages","html":"\u003cul\u003e\n\u003cli\u003e\u003cstrong\u003eERROR\u003c/strong\u003e, representative base-backup primary: \u003ccode\u003ecould not access directory \"%s\": %m\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eERROR\u003c/strong\u003e, representative tablespace primary: \u003ccode\u003ecould not set permissions on directory \"%s\": %m\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eThe \u003ccode\u003e%m\u003c/code\u003e expansion is the saved OS error text; when it is \u003ccode\u003eENAMETOOLONG\u003c/code\u003e, \u003ccode\u003eerrcode_for_file_access()\u003c/code\u003e supplies SQLSTATE \u003ccode\u003e58P03\u003c/code\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eThere is no fixed source-backed \u003ccode\u003e58P03\u003c/code\u003e primary independent of the caller in this review. Do not replace \u003ccode\u003e%m\u003c/code\u003e with an invented English sentence or infer an extension's message from the condition name.\u003c/p\u003e"},{"anchor":"diagnosis","heading":"Diagnosis","html":"\u003cp\u003eCapture the complete primary/detail/context, the operation and component, the full path, operating-system errno, filesystem limits, encoding, and any PostgreSQL object-name mapping. Distinguish a filesystem component limit from PostgreSQL's identifier limits, and distinguish the helper's \u003ccode\u003eENAMETOOLONG\u003c/code\u003e branch from \u003ccode\u003eENOENT\u003c/code\u003e, \u003ccode\u003eEEXIST\u003c/code\u003e, disk-full, and I/O branches. The fixed source confirms the helper and representative callers; it does not claim a natural reproduction on a particular host.\u003c/p\u003e"},{"anchor":"response","heading":"Response","html":"\u003cp\u003eUse a path and name accepted by the owning component and filesystem, or relocate the target while preserving a durable mapping. For a client \u003ccode\u003eERROR\u003c/code\u003e in an explicit transaction, \u003ccode\u003eROLLBACK\u003c/code\u003e or an existing savepoint is required before continuing; fix the path and retry the affected operation, not arbitrary unrelated statements. A startup/background caller may have no client transaction, and a terminated backend requires a new connection. Preserve the original OS detail when escalating the issue.\u003c/p\u003e"},{"anchor":"versions","heading":"Versions","html":"\u003cp\u003eThe locked catalogue records \u003ccode\u003e58P03\u003c/code\u003e from 18.0; fixed helper and caller coverage is PostgreSQL 18.6. The page is source-reviewed only and has no natural runtime claim.\u003c/p\u003e"},{"anchor":"related","heading":"Related","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":"Sources","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\u003eThe structured \u003ca href=\"#sources\"\u003eevidence record\u003c/a\u003e records the errno mapping, representative primaries, and source/runtime boundary.\u003c/p\u003e"}],"summary":"58P03 is selected by PostgreSQL's file-access errno helper when the saved OS errno is ENAMETOOLONG. It is not a standalone fixed primary such as file name too long: the caller supplies a %m message, and the helper supplies the SQLSTATE.","title":"58P03 — file_name_too_long","translation_source_rev":"974d1c6dd5057ec8e85b565f2d17ee4fcbf88755286a0c404bbcfc67a16678c9"}},"RequestedLocale":"en","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"}}]}
