On 2023/06/07 23:15, Joseph Koshakow wrote:
I think I may have discovered a reason why is_superuser is intentionally undocumented. is_superuser is not updated if a role's superuser attribute is changed by another session. Therefore, is_superuser may show you an incorrect stale value. Perhaps this can be fixed with a show_hook? Otherwise it's probably best not to document a GUC that can show an incorrect value.
Or we can correct the description of is_superuser, for example, "True if the current role had superuser privileges when it connected to the database. Note that this parameter doesn't always indicate the current superuser status of the role."? Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION