Обсуждение: pg_ctl init doc bug

Поиск
Список
Период
Сортировка

pg_ctl init doc bug

От
Euler Taveira de Oliveira
Дата:
Hi,

While executing the following command I got:

$ pg_ctl init -D /tmp/foo -o "-N 11"
/home/euler/pg/bin/initdb: invalid option -- N
Try "initdb --help" for more information.
pg_ctl: database system initialization failed

I tried "-N 11" (postgres option) after looking at the manual but the -o
option only accept initdb options so I think there is a documentation bug.
Patch is attached.

While at it, is it worth adding a pg_ctl init example?


--
  Euler Taveira de Oliveira
  http://www.timbira.com/
diff --git a/doc/src/sgml/ref/pg_ctl-ref.sgml b/doc/src/sgml/ref/pg_ctl-ref.sgml
index 29bea24..0cc82cd 100644
*** a/doc/src/sgml/ref/pg_ctl-ref.sgml
--- b/doc/src/sgml/ref/pg_ctl-ref.sgml
*************** PostgreSQL documentation
*** 25,31 ****
     <arg choice="plain">init[db]</arg>
     <arg>-s</arg>
     <arg>-D <replaceable>datadir</replaceable></arg>
!    <arg>-o <replaceable>options</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis>
--- 25,31 ----
     <arg choice="plain">init[db]</arg>
     <arg>-s</arg>
     <arg>-D <replaceable>datadir</replaceable></arg>
!    <arg>-o <replaceable>init-options</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis>
*************** PostgreSQL documentation
*** 263,268 ****
--- 263,282 ----
       </varlistentry>

       <varlistentry>
+       <term><option>-o <replaceable class="parameter">init-options</replaceable></option></term>
+       <listitem>
+        <para>
+         Specifies options to be passed directly to the
+         <command>initdb</command> command.
+        </para>
+        <para>
+         The options are usually surrounded by single or double
+         quotes to ensure that they are passed through as a group.
+        </para>
+       </listitem>
+      </varlistentry>
+
+      <varlistentry>
        <term><option>-m <replaceable class="parameter">mode</replaceable></option></term>
        <listitem>
         <para>

Re: pg_ctl init doc bug

От
Tom Lane
Дата:
Euler Taveira de Oliveira <euler@timbira.com> writes:
> I tried "-N 11" (postgres option) after looking at the manual but the -o
> option only accept initdb options so I think there is a documentation bug.
> Patch is attached.

Yeah, the init option was squeezed in later with only minimal attention
to documentation.  Agree with your idea of treating its -o option as
taking a different kind of argument.  Will apply.
        regards, tom lane