Skip to content

Commit 626f437

Browse files
committed
Improve docs formatting of command line options.
1 parent 9259960 commit 626f437

File tree

1 file changed

+46
-43
lines changed

1 file changed

+46
-43
lines changed

docs/pgloader.rst

Lines changed: 46 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -59,102 +59,103 @@ Options
5959
Inquiry Options
6060
^^^^^^^^^^^^^^^
6161

62-
Use these options when you want to know more about how to use `pgloader`, as
63-
those options will cause `pgloader` not to load any data.
62+
Use these options when you want to know more about how to use pgloader, as
63+
those options will cause pgloader not to load any data.
6464

65-
* `-h`, `--help`
65+
--help
6666

6767
Show command usage summary and exit.
6868

69-
* `-V`, `--version`
69+
--version
7070

7171
Show pgloader version string and exit.
7272

73-
* `-E`, `--list-encodings`
73+
--with-encodings
7474

7575
List known encodings in this version of pgloader.
7676

77-
* `-U`, `--upgrade-config`
77+
--upgrade-config
7878

79-
Parse given files in the command line as `pgloader.conf` files with the
80-
`INI` syntax that was in use in pgloader versions 2.x, and output the
79+
Parse given files in the command line as ``pgloader.conf`` files with
80+
the INI syntax that was in use in pgloader versions 2.x, and output the
8181
new command syntax for pgloader on standard output.
8282

8383

8484
General Options
8585
^^^^^^^^^^^^^^^
8686

87-
Those options are meant to tweak `pgloader` behavior when loading data.
87+
Those options are meant to tweak pgloader behavior when loading data.
8888

89-
* `-v`, `--verbose`
89+
--verbose
9090

9191
Be verbose.
9292

93-
* `-q`, `--quiet`
93+
--quiet
9494

9595
Be quiet.
9696

97-
* `-d`, `--debug`
97+
--debug
9898

9999
Show debug level information messages.
100100

101-
* `-D`, `--root-dir`
101+
--root-dir
102102

103-
Set the root working directory (default to "/tmp/pgloader").
103+
Set the root working directory (defaults to ``/tmp/pgloader``).
104104

105-
* `-L`, `--logfile`
105+
--logfile
106106

107-
Set the pgloader log file (default to "/tmp/pgloader/pgloader.log").
107+
Set the pgloader log file (defaults to ``/tmp/pgloader/pgloader.log``).
108108

109-
* `--log-min-messages`
109+
--log-min-messages
110110

111111
Minimum level of verbosity needed for log message to make it to the
112112
logfile. One of critical, log, error, warning, notice, info or debug.
113113

114-
* `--client-min-messages`
114+
--client-min-messages
115115

116116
Minimum level of verbosity needed for log message to make it to the
117117
console. One of critical, log, error, warning, notice, info or debug.
118118

119-
* `-S`, `--summary`
119+
--summary
120120

121121
A filename where to copy the summary output. When relative, the filename
122-
is expanded into `*root-dir*`.
122+
is expanded into ``*root-dir*``.
123123

124124
The format of the filename defaults to being *human readable*. It is
125+
125126
possible to have the output in machine friendly formats such as *CSV*,
126127
*COPY* (PostgreSQL's own COPY format) or *JSON* by specifying a filename
127-
with the extension resp. `.csv`, `.copy` or `.json`.
128+
with the extension resp. ``.csv``, ``.copy`` or ``.json``.
128129

129-
* `-l <file>`, `--load-lisp-file <file>`
130+
--load-lisp-file <file>
130131

131132
Specify a lisp <file> to compile and load into the pgloader image before
132133
reading the commands, allowing to define extra transformation function.
133-
Those functions should be defined in the `pgloader.transforms` package.
134-
This option can appear more than once in the command line.
134+
Those functions should be defined in the ``pgloader.transforms``
135+
package. This option can appear more than once in the command line.
135136

136-
* `--dry-run`
137+
--dry-run
137138

138-
Allow testing a `.load` file without actually trying to load any data.
139+
Allow testing a ``.load`` file without actually trying to load any data.
139140
It's useful to debug it until it's ok, in particular to fix connection
140141
strings.
141142

142-
* `--on-error-stop`
143+
--on-error-stop
143144

144145
Alter pgloader behavior: rather than trying to be smart about error
145146
handling and continue loading good data, separating away the bad one,
146147
just stop as soon as PostgreSQL refuses anything sent to it. Useful to
147148
debug data processing, transformation function and specific type
148149
casting.
149150

150-
* `--self-upgrade <directory>`
151+
--self-upgrade <directory>
151152

152153
Specify a <directory> where to find pgloader sources so that one of the
153154
very first things it does is dynamically loading-in (and compiling to
154155
machine code) another version of itself, usually a newer one like a very
155156
recent git checkout.
156157

157-
* `--no-ssl-cert-verification`
158+
--no-ssl-cert-verification
158159

159160
Uses the OpenSSL option to accept a locally issued server-side
160161
certificate, avoiding the following error message::
@@ -169,53 +170,55 @@ Those options are meant to tweak `pgloader` behavior when loading data.
169170
Command Line Only Operations
170171
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
171172

172-
Those options are meant to be used when using `pgloader` from the command
173-
line only, rather than using a command file and the rich command clauses and
173+
Those options are meant to be used when using pgloader from the command line
174+
only, rather than using a command file and the rich command clauses and
174175
parser. In simple cases, it can be much easier to use the *SOURCE* and
175176
*TARGET* directly on the command line, then tweak the loading with those
176177
options:
177178

178-
* `--with "option"`
179+
--with <option>
179180

180181
Allows setting options from the command line. You can use that option as
181182
many times as you want. The option arguments must follow the *WITH*
182-
clause for the source type of the `SOURCE` specification, as described
183+
clause for the source type of the ``SOURCE`` specification, as described
183184
later in this document.
184185

185-
* `--set "guc_name='value'"`
186+
--set
186187

187188
Allows setting PostgreSQL configuration from the command line. Note that
188189
the option parsing is the same as when used from the *SET* command
189190
clause, in particular you must enclose the guc value with single-quotes.
190191

191-
* `--field "..."`
192+
Use ``--set "guc_name='value'"``.
193+
194+
--field
192195

193196
Allows setting a source field definition. Fields are accumulated in the
194-
order given on the command line. It's possible to either use a `--field`
195-
option per field in the source file, or to separate field definitions by
196-
a comma, as you would do in the *HAVING FIELDS* clause.
197+
order given on the command line. It's possible to either use a
198+
``--field`` option per field in the source file, or to separate field
199+
definitions by a comma, as you would do in the *HAVING FIELDS* clause.
197200

198-
* `--cast "..."`
201+
--cast <rule>
199202

200203
Allows setting a specific casting rule for loading the data.
201204

202-
* `--type csv|fixed|db3|ixf|sqlite|mysql|mssql`
205+
--type <csv|fixed|db3|ixf|sqlite|mysql|mssql>
203206

204207
Allows forcing the source type, in case when the *SOURCE* parsing isn't
205208
satisfying.
206209

207-
* `--encoding <encoding>`
210+
--encoding <encoding>
208211

209212
Set the encoding of the source file to load data from.
210213

211-
* `--before <filename>`
214+
--before <filename>
212215

213216
Parse given filename for SQL queries and run them against the target
214217
database before loading the data from the source. The queries are parsed
215218
by pgloader itself: they need to be terminated by a semi-colon (;) and
216219
the file may include `\i` or `\ir` commands to *include* another file.
217220

218-
* `--after <filename>`
221+
--after <filename>
219222

220223
Parse given filename for SQL queries and run them against the target
221224
database after having loaded the data from the source. The queries are

0 commit comments

Comments
 (0)