Zheng Li <zhengl...@gmail.com> writes: > The behavior is due to the following code > https://github.com/postgres/postgres/blob/master/src/backend/commands/define.c#L113
Yeah, so you can grep for places that have this behavior by looking for defGetBoolean calls ... and there are quite a few. That leads me to the conclusion that we'd better invent a fairly stylized documentation solution that we can plug into a lot of places, rather than thinking of slightly different ways to say it and places to say it. I'm not necessarily opposed to Peter's desire to fix replication-related commands first, but we have more to do later. I'm also not that thrilled with putting the addition up at the top of the relevant text. This behavior is at least two decades old, so if we've escaped documenting it at all up to now, it can't be that important to most people. I also notice that ALTER SUBSCRIPTION has fully three different sub-sections with about equal claims on this note, if we're going to stick it directly into the affected option lists. That all leads me to propose that we add the new text at the end of the Parameters <refsect1> in the affected man pages. So about like the attached. (I left out alter_publication.sgml, as I'm not sure it needs its own copy of this text --- it doesn't describe individual parameters at all, just refer to CREATE PUBLICATION.) regards, tom lane
diff --git a/doc/src/sgml/ref/alter_subscription.sgml b/doc/src/sgml/ref/alter_subscription.sgml index ad93553a1d..964fcbb8ff 100644 --- a/doc/src/sgml/ref/alter_subscription.sgml +++ b/doc/src/sgml/ref/alter_subscription.sgml @@ -277,6 +277,13 @@ ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> RENAME TO < </listitem> </varlistentry> </variablelist> + + <para> + When specifying a parameter of type <type>boolean</type>, the + <literal>=</literal> <replaceable class="parameter">value</replaceable> + part can be omitted, which is equivalent to + specifying <literal>TRUE</literal>. + </para> </refsect1> <refsect1> diff --git a/doc/src/sgml/ref/create_publication.sgml b/doc/src/sgml/ref/create_publication.sgml index e229384e6f..370dac2ccf 100644 --- a/doc/src/sgml/ref/create_publication.sgml +++ b/doc/src/sgml/ref/create_publication.sgml @@ -217,6 +217,13 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable> </varlistentry> </variablelist> + + <para> + When specifying a parameter of type <type>boolean</type>, the + <literal>=</literal> <replaceable class="parameter">value</replaceable> + part can be omitted, which is equivalent to + specifying <literal>TRUE</literal>. + </para> </refsect1> <refsect1> diff --git a/doc/src/sgml/ref/create_subscription.sgml b/doc/src/sgml/ref/create_subscription.sgml index eba72c6af6..51c45f17c7 100644 --- a/doc/src/sgml/ref/create_subscription.sgml +++ b/doc/src/sgml/ref/create_subscription.sgml @@ -354,6 +354,13 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl </listitem> </varlistentry> </variablelist> + + <para> + When specifying a parameter of type <type>boolean</type>, the + <literal>=</literal> <replaceable class="parameter">value</replaceable> + part can be omitted, which is equivalent to + specifying <literal>TRUE</literal>. + </para> </refsect1> <refsect1 id="sql-createsubscription-notes" xreflabel="Notes">