From: | Peter Smith <smithpb2250(at)gmail(dot)com> |
---|---|
To: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: pub/sub - specifying optional parameters without values. |
Date: | 2022-10-19 02:10:30 |
Message-ID: | CAHut+Pt_GEKrRQuqKKJu6v1g61_BEGKx8TNuhYN_euDmZwqRfA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Oct 18, 2022 at 7:09 AM Justin Pryzby <pryzby(at)telsasoft(dot)com> wrote:
>
> On Fri, Oct 14, 2022 at 07:54:37PM +1100, Peter Smith wrote:
> > Hi hackers.
> >
> > This post is about parameter default values. Specifically. it's about
> > the CREATE PUBLICATION and CREATE SUBSCRIPTION syntax, although the
> > same issue might apply to other commands I am unaware of...
>
> The same thing seems to be true in various other pages:
> git grep 'WITH.*value' doc
>
> In addition to WITH, it's also true of SET:
>
> git grep -F '[= <replaceable class="parameter">value' doc/src/sgml/ref/alter_index.sgml doc/src/sgml/ref/alter_table.sgml doc/src/sgml/ref/create_materialized_view.sgml doc/src/sgml/ref/create_publication.sgml doc/src/sgml/ref/create_subscription.sgml
>
> Note that some utility statements (analyze,cluster,vacuum,reindex) which
> have parenthesized syntax with booleans say this:
> | The boolean value can also be omitted, in which case TRUE is assumed.
Thank you for the feedback and for reporting about other places
similar to this. For now, I only intended to fix docs related to
logical replication. Scope creep to other areas maybe can be addressed
by subsequent patches if this one gets accepted.
>
> BTW, in your patch:
> + <para>
> + A <type>boolean</type> parameter can omit the value. This is equivalent
> + to assigning the parameter to <literal>true</literal>.
> + </para>
> + <para>
>
> should say: "The value can be omitted, which is equivalent to specifying
> TRUE".
>
I've changed the text as you suggested, except in a couple of places
where I qualified by saying "For boolean parameters..."; that's
because the value part is not *always* optional. I've also made
similar updates to the ALTER PUBLICATION/SUBSCRIPTION pages, which
were accidentally missed before.
------
Kind Regards,
Peter Smith.
Fujitsu Australia
Attachment | Content-Type | Size |
---|---|---|
v2-0001-clarify-behavior-of-specifying-a-parameter-with-n.patch | application/octet-stream | 5.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2022-10-19 02:58:59 | Re: TRAP: FailedAssertion("prev_first_lsn < cur_txn->first_lsn", File: "reorderbuffer.c", Line: 927, PID: 568639) |
Previous Message | houzj.fnst@fujitsu.com | 2022-10-19 01:51:37 | RE: Improve errhint for ALTER SUBSCRIPTION ADD/DROP PUBLICATION |