Re: is_superuser is not documented

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Joseph Koshakow <koshy44(at)gmail(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: is_superuser is not documented
Date: 2023-06-07 15:36:39
Message-ID: a56589d0-e5c1-9981-d697-5db86cc5a58d@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Isaac Morland 2023-06-07 15:48:32 Disk space not released after schema deletion
Previous Message Tristan Partin 2023-06-07 15:26:59 Re: Improve join_search_one_level readibilty (one line change)