diff options
author | Michael Paquier <michael@paquier.xyz> | 2022-12-23 10:04:33 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2022-12-23 10:04:33 +0900 |
commit | 7ad458e06b1bf1408d9d089a843070943d6c7c6a (patch) | |
tree | 73a5693fcf2cd7383643afa4ce0e6a0b1163a7af | |
parent | 97431d673992326f4f85e4f185941444f33e20db (diff) | |
download | postgresql-7ad458e06b1bf1408d9d089a843070943d6c7c6a.tar.gz postgresql-7ad458e06b1bf1408d9d089a843070943d6c7c6a.zip |
Fix come incorrect elog() messages in aclchk.c
Three error strings used with cache lookup failures were referring to
incorrect object types for ACL checks:
- Schemas
- Types
- Foreign Servers
There errors should never be triggered, but if they do incorrect
information would be reported.
Author: Justin Pryzby
Discussion: https://postgr.es/m/20221222153041.GN1153@telsasoft.com
Backpatch-through: 11
-rw-r--r-- | src/backend/catalog/aclchk.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/catalog/aclchk.c b/src/backend/catalog/aclchk.c index 53392414f10..1309d006425 100644 --- a/src/backend/catalog/aclchk.c +++ b/src/backend/catalog/aclchk.c @@ -5752,7 +5752,7 @@ recordExtObjInitPriv(Oid objoid, Oid classoid) tuple = SearchSysCache1(FOREIGNSERVEROID, ObjectIdGetDatum(objoid)); if (!HeapTupleIsValid(tuple)) - elog(ERROR, "cache lookup failed for foreign data wrapper %u", + elog(ERROR, "cache lookup failed for foreign server %u", objoid); aclDatum = SysCacheGetAttr(FOREIGNSERVEROID, tuple, @@ -5838,7 +5838,7 @@ recordExtObjInitPriv(Oid objoid, Oid classoid) tuple = SearchSysCache1(NAMESPACEOID, ObjectIdGetDatum(objoid)); if (!HeapTupleIsValid(tuple)) - elog(ERROR, "cache lookup failed for function %u", objoid); + elog(ERROR, "cache lookup failed for schema %u", objoid); aclDatum = SysCacheGetAttr(NAMESPACEOID, tuple, Anum_pg_namespace_nspacl, &isNull); @@ -5880,7 +5880,7 @@ recordExtObjInitPriv(Oid objoid, Oid classoid) tuple = SearchSysCache1(TYPEOID, ObjectIdGetDatum(objoid)); if (!HeapTupleIsValid(tuple)) - elog(ERROR, "cache lookup failed for function %u", objoid); + elog(ERROR, "cache lookup failed for type %u", objoid); aclDatum = SysCacheGetAttr(TYPEOID, tuple, Anum_pg_type_typacl, &isNull); |