01P01 — deprecated_feature
使用已弃用功能的警告,如 MD5 密码。
英文手册覆盖始于 PostgreSQL 8.1. 来源历史与运行验证各自保留独立版本边界。
当前阅读 PG 18·选择有来源记录的版本
- aliases
- 未知
- class name
- Warning
- condition name
- deprecated_feature
- lang
- en
- sqlstate
- 01P01
版本定义 PG 18
01P01 — deprecated_feature
速览 {#at-a-glance}
PostgreSQL 18.6 在设置密码的操作产生或保留 MD5 verifier 时以 WARNING 发出 01P01。这是仍可继续的命令上的弃用通知,不是所有旧功能的通用失败码。
含义 {#meaning}
确认的 18.6 实现是 src/backend/libpq/crypt.c 的设置密码路径,在最终 verifier 为 MD5 时发出 warning。触发依据是最终存储的 verifier 形式,例如 password_encryption = 'md5' 下的明文输入,或作为输入传入已有的 md5... verifier;它不是 pg_hba.conf 的认证方法,已有 SCRAM verifier 本身也不会触发此 warning。
消息与诊断 {#messages}
固定路径主消息为 setting an MD5-encrypted password;detail 为 MD5 password support is deprecated and will be removed in a future release of PostgreSQL.;hint 为 Refer to the PostgreSQL documentation for details about migrating to another password type.
诊断 {#diagnosis}
检查设置密码会话中的 SHOW password_encryption、输入是明文还是已有的 md5... verifier,并在有权限时检查角色最终 verifier。保留完整 warning,因为 detail 和 hint 指出了受影响的方法及迁移方向。不要把 pg_hba.conf 的认证方法当成触发条件,也不要把已有 SCRAM verifier 推断为此 warning 的原因。
处理 {#response}
按官方密码认证文档将受影响角色迁移到 SCRAM;对于明文输入,先将 password_encryption 设为 scram-sha-256,再重置密码,并验证客户端兼容性。不要把旧 MD5 verifier 原样作为迁移步骤。warning 本身不要求原样重试设置密码命令。
版本 {#versions}
01P01 在锁定目录 9.0.23 至 18.6 以及 19 Beta 3 中存在,known_present_by 为 8.0.0。固定的 MD5 路径和措辞仅确认 18.6;其他弃用功能或旧措辞需要独立来源。
相关 {#related}
01000 是警告类;28P01 是密码无效 error;00000 是成功完成。
来源 {#sources}
errcodes.txt— 定义,SHA-2566e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba.crypt.c— 固定路径,SHA-256d0c7579210827dbaec466f1c064a3d1ea2f7f7bfbf8b40b2e79fb4769cb406a9。- 结构化证据 — 固定来源、消息和运行边界。
比较版本
SQLSTATE 证据与已记录的运行版本
claims · identity
{
"claim_id": "identity",
"limits": "",
"method": "Read the fixed errcodes definition row and macro.",
"position": 0,
"runtime": [],
"sources": [
"src.errcodes.18.6"
],
"statement": "01P01 is deprecated_feature in SQLSTATE Class 01."
}claims · source-path
{
"claim_id": "source-path",
"limits": "This confirms a source path and current wording; it is not a runtime observation of every installation.",
"method": "Read the fixed source context around the SQLSTATE macro.",
"position": 1,
"runtime": [],
"sources": [
"src.crypt.18.6"
],
"statement": "A fixed PostgreSQL 18.6 source path uses this SQLSTATE at the stated severity and operation."
}claims · verifier-trigger
{
"claim_id": "verifier-trigger",
"limits": "Source evidence confirms the warning call site and exact fields; no natural password-setting runtime is claimed.",
"method": "Read the fixed crypt.c warning call site and its password-setting context.",
"position": 2,
"runtime": [],
"sources": [
"src.crypt.18.6"
],
"statement": "The fixed password-setting path is relevant when the resulting stored verifier is MD5; diagnose password_encryption and the supplied verifier form, and do not treat pg_hba.conf authentication method or an existing SCRAM verifier as this warning trigger."
}messages · md5-password-deprecated
{
"limits": "",
"message_id": "md5-password-deprecated",
"path": "L181-L185",
"position": 0,
"raw": {
"detail_template": "MD5 password support is deprecated and will be removed in a future release of PostgreSQL.",
"hint_template": "Refer to the PostgreSQL documentation for details about migrating to another password type.",
"id": "md5-password-deprecated",
"path": "L181-L185",
"primary_template": "setting an MD5-encrypted password",
"severity": "WARNING",
"source_ids": [
"src.crypt.18.6"
],
"sources": [
"src.crypt.18.6"
],
"sqlstate": "01P01"
},
"severity": "WARNING",
"sources": [
"src.crypt.18.6"
],
"templates": [
{
"kind": "primary",
"literal": "setting an MD5-encrypted password",
"position": 0,
"role": "",
"template": "setting an MD5-encrypted password"
},
{
"kind": "detail",
"literal": "MD5 password support is deprecated and will be removed in a future release of PostgreSQL.",
"position": 1,
"role": "",
"template": "MD5 password support is deprecated and will be removed in a future release of PostgreSQL."
},
{
"kind": "hint",
"literal": "Refer to the PostgreSQL documentation for details about migrating to another password type.",
"position": 2,
"role": "",
"template": "Refer to the PostgreSQL documentation for details about migrating to another password type."
}
]
}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.crypt.18.6
{
"commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
"docs_url": "",
"kind": "upstream_source",
"location": "",
"path": "src/backend/libpq/crypt.c",
"position": 1,
"sha256": "d0c7579210827dbaec466f1c064a3d1ea2f7f7bfbf8b40b2e79fb4769cb406a9",
"source_id": "src.crypt.18.6",
"tag": "REL_18_6",
"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/libpq/crypt.c"
}sources · src.calls.REL_18_6
{
"commit": "",
"docs_url": "",
"kind": "local_artifact",
"location": "",
"path": "raw/calls/REL_18_6.jsonl",
"position": 2,
"sha256": "9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf",
"source_id": "src.calls.REL_18_6",
"tag": "",
"url": ""
}来源引用
定义来源
center · PostgreSQL 18 · english-manuals:11b7083f8cc55032237c7e4152931fd262965d7d9f8a435cc694c8cc5f43b5ec
正文语言: zh-Hans · english-manuals:11b7083f8cc55032237c7e4152931fd262965d7d9f8a435cc694c8cc5f43b5ec