Skip to content

Commit c0a6f9c

Browse files
committed
Improve documentation of postgres -C option
Clarify help (s/return/print/), and explain that this option is for use by other programs, not for user-facing use (it does not print units).
1 parent f871ef7 commit c0a6f9c

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

doc/src/sgml/ref/postgres-ref.sgml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,20 @@ PostgreSQL documentation
144144
<term><option>-C <replaceable>name</replaceable></option></term>
145145
<listitem>
146146
<para>
147-
Returns the value of a named run-time parameter, and exits.
147+
Prints the value of the named run-time parameter, and exits.
148148
(See the <option>-c</> option above for details.) This can
149149
be used on a running server, and returns values from
150150
<filename>postgresql.conf</>, modified by any parameters
151151
supplied in this invocation. It does not reflect parameters
152152
supplied when the cluster was started.
153153
</para>
154+
155+
<para>
156+
This option is meant for other programs that interact with a server
157+
instance, such as <xref linkend="app-pg-ctl">, to query configuration
158+
parameter values. User-facing applications should instead use <xref
159+
linkend="sql-show"> or the <structname>pg_settings</structname> view.
160+
</para>
154161
</listitem>
155162
</varlistentry>
156163

src/backend/main/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ help(const char *progname)
279279
#endif
280280
printf(_(" -B NBUFFERS number of shared buffers\n"));
281281
printf(_(" -c NAME=VALUE set run-time parameter\n"));
282-
printf(_(" -C NAME return run-time parameter\n"));
282+
printf(_(" -C NAME print value of run-time parameter, then exit\n"));
283283
printf(_(" -d 1-5 debugging level\n"));
284284
printf(_(" -D DATADIR database directory\n"));
285285
printf(_(" -e use European date input format (DMY)\n"));

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy