From: Heikki Linnakangas Date: Mon, 9 Feb 2026 17:15:44 +0000 (+0200) Subject: Fix incorrect iteration type in extension_file_exists() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18f0afb2a635b433e778684acabffe1e52da8a86;p=thirdparty%2Fpostgresql.git Fix incorrect iteration type in extension_file_exists() Commit f3c9e341cd changed the type of objects in the List that get_extension_control_directories() returns, from "char *" to "ExtensionLocation *", but missed adjusting this one caller. Author: Chao Li Discussion: https://www.postgresql.org/message-id/362EA9B3-589B-475A-A16E-F10C30426E28@gmail.com --- diff --git a/src/backend/commands/extension.c b/src/backend/commands/extension.c index 72fdd7511bd..81f24615d51 100644 --- a/src/backend/commands/extension.c +++ b/src/backend/commands/extension.c @@ -2686,9 +2686,9 @@ extension_file_exists(const char *extensionName) locations = get_extension_control_directories(); - foreach_ptr(char, location, locations) + foreach_ptr(ExtensionLocation, location, locations) { - dir = AllocateDir(location); + dir = AllocateDir(location->loc); /* * If the control directory doesn't exist, we want to silently return @@ -2700,7 +2700,7 @@ extension_file_exists(const char *extensionName) } else { - while ((de = ReadDir(dir, location)) != NULL) + while ((de = ReadDir(dir, location->loc)) != NULL) { char *extname;