01006 — privilege_not_revoked
01006 has confirmed PostgreSQL 18.6 WARNING paths in src/backend/catalog/aclchk.c for REVOKE. It reports a partial or empty privilege change; the command can complete while sending the warning.
English manual coverage begins with PostgreSQL 8.1. Source history and runtime observations have their own recorded version boundaries.
Reading PG 18·Select a recorded version
- aliases
- Unknown
- class name
- Warning
- condition name
- privilege_not_revoked
- lang
- en
- sqlstate
- 01006
Definition PG 18
01006 — privilege_not_revoked
At a glance {#at-a-glance}
01006 has confirmed PostgreSQL 18.6 WARNING paths in src/backend/catalog/aclchk.c for REVOKE. It reports a partial or empty privilege change; the command can complete while sending the warning.
Meaning {#meaning}
The confirmed 18.6 implementation is the ACL command path for REVOKE. It distinguishes no privilege revoked from not all privileges revoked and uses column-specific and object-specific templates.
Messages and diagnostics {#messages}
The fixed 18.6 paths use these primary templates: no privileges could be revoked for column "%s" of relation "%s", no privileges could be revoked for "%s", not all privileges could be revoked for column "%s" of relation "%s", and not all privileges could be revoked for "%s". They have no detail or hint in the resolved groups.
Diagnosis {#diagnosis}
Record whether the target was a column or an object and the resolved relation/object name. In the fixed aclchk.c function, this_privileges is the requested set intersected with the effective grantor's available grant options. The REVOKE warning is none when that mask is zero, and partial when !all_privs and the mask differs from the request; this warning branch does not inspect the grantee's old ACL. Inspect the effective grantor, grant options, requested privileges, and then the resulting ACL separately. A WARNING is distinct from an ERROR that aborts the command.
Response {#response}
Treat the command result and warning separately. If the intended access change was not achieved, correct the target role/object or requested privilege and verify the resulting ACL; repeating REVOKE without changing the mismatch may produce the same warning.
Versions {#versions}
01006 is present from the locked 9.0.23 snapshot through 18.6 and 19 Beta 3, with known_present_by 8.0.0. The fixed 18.6 warning paths are in aclchk.c; this is not a claim that every historical version used identical wording.
Related {#related}
01007 is the corresponding privilege-not-granted warning; 42501 is an error-category privilege failure; 01000 is the warning class.
Sources {#sources}
errcodes.txt— definition, SHA-2566e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba.aclchk.c— fixed path, SHA-2569700258318959b47c42edb423418fb511dd3a008023e732f601eecf4c80868f8.- Structured evidence — fixed sources, message groups, and runtime boundary.
Compare versions
SQLSTATE evidence and recorded runtime versions
claims · identity
{
"claim_id": "identity",
"limits": "",
"method": "Read the fixed errcodes definition row and macro.",
"position": 0,
"runtime": [],
"sources": [
"src.errcodes.18.6"
],
"statement": "01006 is privilege_not_revoked 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.aclchk.18.6"
],
"statement": "A fixed PostgreSQL 18.6 source path uses this SQLSTATE at the stated severity and operation."
}claims · acl-effective-grantor
{
"claim_id": "acl-effective-grantor",
"limits": "This is a source-level warning condition; it does not claim a natural runtime or prescribe a universal role/ACL setup.",
"method": "Read restrict_and_check_grant() and its fixed {op} report branches around aclchk.c lines 318-382.",
"position": 2,
"runtime": [],
"sources": [
"src.aclchk.18.6"
],
"statement": "The fixed aclchk.c function computes this_privileges as the requested privilege set intersected with the effective grantor's available grant options. The REVOKE none branch warns when that mask is zero; the partial branch warns when !all_privs and the mask differs from the request. This warning branch does not inspect the grantee's old ACL; the resulting ACL must be checked separately."
}messages · acl-revoke-column-none
{
"limits": "",
"message_id": "acl-revoke-column-none",
"path": "src.aclchk.18.6",
"position": 0,
"raw": {
"id": "acl-revoke-column-none",
"path": "src.aclchk.18.6",
"primary_template": "no privileges could be revoked for column \"%s\" of relation \"%s\"",
"severity": "WARNING",
"source_ids": [
"src.aclchk.18.6"
],
"sources": [
"src.aclchk.18.6"
],
"sqlstate": "01006"
},
"severity": "WARNING",
"sources": [
"src.aclchk.18.6"
],
"templates": [
{
"kind": "primary",
"literal": "no privileges could be revoked for column \" \" of relation \" \"",
"position": 0,
"role": "",
"template": "no privileges could be revoked for column \"%s\" of relation \"%s\""
}
]
}messages · acl-revoke-object-none
{
"limits": "",
"message_id": "acl-revoke-object-none",
"path": "src.aclchk.18.6",
"position": 1,
"raw": {
"id": "acl-revoke-object-none",
"path": "src.aclchk.18.6",
"primary_template": "no privileges could be revoked for \"%s\"",
"severity": "WARNING",
"source_ids": [
"src.aclchk.18.6"
],
"sources": [
"src.aclchk.18.6"
],
"sqlstate": "01006"
},
"severity": "WARNING",
"sources": [
"src.aclchk.18.6"
],
"templates": [
{
"kind": "primary",
"literal": "no privileges could be revoked for \" \"",
"position": 0,
"role": "",
"template": "no privileges could be revoked for \"%s\""
}
]
}messages · acl-revoke-column-partial
{
"limits": "",
"message_id": "acl-revoke-column-partial",
"path": "src.aclchk.18.6",
"position": 2,
"raw": {
"id": "acl-revoke-column-partial",
"path": "src.aclchk.18.6",
"primary_template": "not all privileges could be revoked for column \"%s\" of relation \"%s\"",
"severity": "WARNING",
"source_ids": [
"src.aclchk.18.6"
],
"sources": [
"src.aclchk.18.6"
],
"sqlstate": "01006"
},
"severity": "WARNING",
"sources": [
"src.aclchk.18.6"
],
"templates": [
{
"kind": "primary",
"literal": "not all privileges could be revoked for column \" \" of relation \" \"",
"position": 0,
"role": "",
"template": "not all privileges could be revoked for column \"%s\" of relation \"%s\""
}
]
}messages · acl-revoke-object-partial
{
"limits": "",
"message_id": "acl-revoke-object-partial",
"path": "src.aclchk.18.6",
"position": 3,
"raw": {
"id": "acl-revoke-object-partial",
"path": "src.aclchk.18.6",
"primary_template": "not all privileges could be revoked for \"%s\"",
"severity": "WARNING",
"source_ids": [
"src.aclchk.18.6"
],
"sources": [
"src.aclchk.18.6"
],
"sqlstate": "01006"
},
"severity": "WARNING",
"sources": [
"src.aclchk.18.6"
],
"templates": [
{
"kind": "primary",
"literal": "not all privileges could be revoked for \" \"",
"position": 0,
"role": "",
"template": "not all privileges could be revoked for \"%s\""
}
]
}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.aclchk.18.6
{
"commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
"docs_url": "",
"kind": "upstream_source",
"location": "",
"path": "src/backend/catalog/aclchk.c",
"position": 1,
"sha256": "9700258318959b47c42edb423418fb511dd3a008023e732f601eecf4c80868f8",
"source_id": "src.aclchk.18.6",
"tag": "REL_18_6",
"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/catalog/aclchk.c#L318-L382"
}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": ""
}Source references
Full definition and evidence JSON
Definition sources
center · PostgreSQL 18 · english-manuals:591145c7a17d157b98c24901bc6900d364555693f4fe6c39933ecf0ff7e1d261
Text language: en · english-manuals:591145c7a17d157b98c24901bc6900d364555693f4fe6c39933ecf0ff7e1d261