@@ -243,22 +243,22 @@ IsIcebergCatalogServer(const char *serverName)
243243
244244
245245/*
246- * ScrubUserMappingSecrets overwrites secret option values in the query
246+ * RedactUserMappingSecrets overwrites secret option values in the query
247247 * string in-place with asterisks.
248248 *
249249 * In-place mutation is essential: pg_stat_statements captures the queryString
250250 * pointer before calling prev_ProcessUtility, then stores it after the call
251251 * returns. A copy with pstrdup would be invisible to pg_stat_statements
252252 * because its local pointer still references the original memory. By
253253 * overwriting the original buffer, every holder of that pointer — including
254- * pg_stat_statements — sees the scrubbed version.
254+ * pg_stat_statements — sees the redacted version.
255255 *
256256 * The actual DDL execution is unaffected because CREATE/ALTER USER MAPPING
257257 * reads option values from the parse tree (DefElem nodes), not from
258258 * queryString.
259259 */
260260static void
261- ScrubUserMappingSecrets (const char * queryString , List * options )
261+ RedactUserMappingSecrets (const char * queryString , List * options )
262262{
263263 const char * secret_options [] = {"client_id" , "client_secret" , NULL };
264264 ListCell * lc ;
@@ -339,7 +339,7 @@ RedactRestCatalogUserMappingSecrets(ProcessUtilityParams * processUtilityParams,
339339 if (!IsIcebergCatalogServer (serverName ))
340340 return false;
341341
342- ScrubUserMappingSecrets (processUtilityParams -> queryString , options );
342+ RedactUserMappingSecrets (processUtilityParams -> queryString , options );
343343
344344 return false;
345345}
@@ -655,13 +655,14 @@ GetRestCatalogOptionsFromCatalog(const char *catalog)
655655 }
656656
657657 /*
658- * User mapping has highest priority — overrides everything above
659- * Can only be set for user-created servers
658+ * User mapping has highest priority — overrides everything above Can
659+ * only be set for user-created servers
660660 */
661661 if (server != NULL )
662662 {
663663 List * umOptions = LookupUserMappingOptions (server -> serverid );
664664 ListCell * lc ;
665+
665666 foreach (lc , umOptions )
666667 {
667668 DefElem * def = (DefElem * ) lfirst (lc );
0 commit comments