git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 13e0d7a)
Fix come incorrect elog() messages in aclchk.c
2022年12月23日 01:04:18 +0000 (10:04 +0900)
2022年12月23日 01:04:18 +0000 (10:04 +0900)
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


diff --git a/src/backend/catalog/aclchk.c b/src/backend/catalog/aclchk.c
index d2597bf5127d31b21ca30f0161dc33a99bc376b4..cdfd6378156954815b55df43f9f88f705f3b50ca 100644 (file)
--- a/src/backend/catalog/aclchk.c
+++ b/src/backend/catalog/aclchk.c
@@ -4369,7 +4369,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,
@@ -4455,7 +4455,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);
@@ -4497,7 +4497,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);
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /