On 2023/04/08 23:53, Joseph Koshakow wrote:
>
>
> On Mon, Apr 3, 2023 at 10:47 AM Fujii Masao <masao.fujii@oss.nttdata.com <mailto:masao.fujii@oss.nttdata.com>>
wrote:
> > Yes, the patch has not been committed yet because of lack of review comments.
> > Do you have any review comments on this patch?
> > Or you think it's ready for committer?
>
> I'm not very familiar with this code, so I'm not sure how much my
> review is worth, but maybe it will spark some discussion.
Thanks for the comments!
> > Yes, this patch moves the descriptions of is_superuser to config.sgml
> > and changes its group to PRESET_OPTIONS.
>
> is_superuser feels a little out of place in this file. All of
> the options here apply to the entire PostgreSQL server, while
> is_superuser only applies to the current session.
Aren't other preset options like lc_collate, lc_ctype and server_encoding
similar to is_superuser? They seem to behave in a similar way as their
settings can be different for each connection depending on the connected database.
> I'm not familiar with the origins of is_superuser and it may be too
> late for this, but it seems like is_superuser would fit in much better
> as a system information function [0] rather than a GUC. Particularly
> in the Session Information Functions.
I understand your point, but I think it would be more confusing to document
is_superuser there because it's defined and behaves differently from
session information functions like current_user. For instance,
the value of is_superuser can be displayed using SHOW command,
while current_user cannot. Therefore, it's better to keep is_superuser
separate from the session information functions.
> As a side note server_version, server_encoding, lc_collate, and
> lc_ctype all appear in both the preset options section of config.sgml
> and in show.sgml. I'm not sure what the logic is for just including
> these three parameters in show.sgml, but I think we should either
> include all of the preset options or none of them.
Agreed. I think that it's better to just treat them as GUCs and
remove their descriptions from show.sgml.
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION