aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2022-12-23 10:04:34 +0900
committerMichael Paquier <michael@paquier.xyz>2022-12-23 10:04:34 +0900
commit4dbe72d61ac6dc1ed4a230db2adec1dc01041f7f (patch)
tree5a1ee28d0cc1216740c3ba892f84733c26487e19
parent4fceb454f2df57f63d05ccb4a26a9f49c377f28c (diff)
downloadpostgresql-4dbe72d61ac6dc1ed4a230db2adec1dc01041f7f.tar.gz
postgresql-4dbe72d61ac6dc1ed4a230db2adec1dc01041f7f.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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/catalog/aclchk.c b/src/backend/catalog/aclchk.c
index 4f1e8a46e0d..a82aa516a63 100644
--- a/src/backend/catalog/aclchk.c
+++ b/src/backend/catalog/aclchk.c
@@ -5652,7 +5652,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,
@@ -5738,7 +5738,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);
@@ -5780,7 +5780,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);