aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2022-12-23 10:04:36 +0900
committerMichael Paquier <michael@paquier.xyz>2022-12-23 10:04:36 +0900
commit7445869e1b0d369af9125c9db8196a3be3f44463 (patch)
tree301f1fc40f801b99b96942d2219edfefafb8bf49 /src/backend
parentd572003f74bb6bddac1c0eaf7fb5d0c4af1a3890 (diff)
downloadpostgresql-7445869e1b0d369af9125c9db8196a3be3f44463.tar.gz
postgresql-7445869e1b0d369af9125c9db8196a3be3f44463.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
Diffstat (limited to 'src/backend')
-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 e2970bfb005..30c601c23d2 100644
--- a/src/backend/catalog/aclchk.c
+++ b/src/backend/catalog/aclchk.c
@@ -5684,7 +5684,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,
@@ -5765,7 +5765,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);
@@ -5807,7 +5807,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);