public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: Re: BUG #19540: Inconsistent integer-to-octal formatting for permission GUCs in pg_settings (boot_val vs setting)
Date: Tue, 30 Jun 2026 11:58:08 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

PG Bug reporting form <[email protected]> writes:
> Steps to reproduce:
> postgres=# SELECT name, setting, boot_val
> FROM pg_settings
> WHERE name IN ('data_directory_mode', 'log_file_mode',
> 'unix_socket_permissions');

> Actual Result :
>           name           | setting | boot_val
> -------------------------+---------+----------
>  data_directory_mode     | 0700    | 448
>  log_file_mode           | 0600    | 384
>  unix_socket_permissions | 0777    | 511
> (3 rows)

Yeah, the min and max columns are confusing too.  That's because
we entrust the formatting to the "show_hook" for those variables,
and those hooks are defined to show the current value only.

Looking through the existing show_hooks, all the other ones seem to
be used to account for situations where the effective value depends on
more than just the GUC variable itself.  Maybe we should say that
a show_hook should be used only for that purpose and not for specially
formatting the value?  We could deal with these cases by inventing a
new GUC flag, say GUC_SHOW_IN_OCTAL, that could be applied to all the
relevant values.

			regards, tom lane






view thread (2+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: BUG #19540: Inconsistent integer-to-octal formatting for permission GUCs in pg_settings (boot_val vs setting)
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox