On 2024/07/29 12:58, Hayato Kuroda (Fujitsu) wrote:
Dear Fujii-san,

IIUC, the patch which adds user_name attribute to get_connection() can be
discussed
in later stage, is it right?

No, let's work on the patch at this stage :)

OK, here is a rebased patch.

Thanks for updating the patch!

- Changed the name of new API from `GetUserMappingFromOid` to 
`GetUserMappingByOid`
   to keep the name consistent with others.

If we expose this function as an FDW helper function, it should return
a complete UserMapping object, including umoptions.

However, if postgres_fdw_get_connections() is the only user of this function,
I'm not inclined to expose it as an FDW helper. Instead, we can either get
the user ID by user mapping OID directly in connection.c using SearchSysCache(),
or add the user ID to ConnCacheEntry and use it in 
postgres_fdw_get_connections().
Thought?

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION


Reply via email to