Re: createuser doesn't tell default settings for some options

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: createuser doesn't tell default settings for some options
Date: 2022-11-21 14:07:17
Message-ID: B6D1C802-DFD1-4E90-A5FC-DD860280A233@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 10 Aug 2022, at 10:28, Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>
>> On 10 Aug 2022, at 08:12, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> wrote:
>>
>> (I suppose this is a pg15 issue)
>>
>> createuser --help shows the following help text.
>>
>>> --bypassrls role can bypass row-level security (RLS) policy
>>> --no-bypassrls role cannot bypass row-level security (RLS) policy
>>> --replication role can initiate replication
>>> --no-replication role cannot initiate replication
>>
>> For other options the text tells which one is the default, which I
>> think the two options also should have the same.
>
> Agreed. For --no-replication the docs in createuser.sgml should fixed to
> include a "This is the default" sentence like the others have as well.

>> The ternary options are checked against decimal 0, but it should use
>> TRI_DEFAULT instead. (attached third)
>
> Agreed, nice catch.

Attached is my proposal for this, combining your 0001 and 0003 patches with
some docs and test fixups to match.

--
Daniel Gustafsson https://vmware.com/

Attachment Content-Type Size
v2-0001-Fix-handling-of-default-option-values-in-createus.patch application/octet-stream 7.5 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2022-11-21 14:19:56 Re: Catalog_xmin is not advanced when a logical slot is lost
Previous Message Dmitry Koval 2022-11-21 13:55:36 Re: Operation log for major operations