Skip to content

Commit b36b1db

Browse files
author
James William Pye
committed
Update command reference to reflect the removal of 'scripts'.
1 parent be81fd0 commit b36b1db

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

postgresql/documentation/bin.txt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Commands
44
This chapter discusses the usage of the available console scripts.
55

66

7-
``pg_python``
8-
=============
7+
postgresql.bin.pg_python
8+
========================
99

1010
The ``pg_python`` command provides a simple way to write Python scripts against a
1111
single target database. It acts like the regular Python console command, but
@@ -37,7 +37,7 @@ with the following built-ins:
3737
pg_python Usage
3838
---------------
3939

40-
Usage: pg_python.py [connection options] [script] ...
40+
Usage: postgresql.bin.pg_python [connection options] [script] ...
4141

4242
Options:
4343
--unix=UNIX path to filesystem socket
@@ -85,17 +85,17 @@ pg_python Examples
8585

8686
Module execution taking advantage of the new built-ins::
8787

88-
$ pg_python -h localhost -W -m timeit "prepare('SELECT 1').first()"
88+
$ python3 -m postgresql.bin.pg_python -h localhost -W -m timeit "prepare('SELECT 1').first()"
8989
Password for pg_python[pq://jwp@localhost:5432]:
9090
1000 loops, best of 3: 1.35 msec per loop
9191

92-
$ pg_python -h localhost -W -m timeit -s "ps=prepare('SELECT 1')" "ps.first()"
92+
$ python3 -m postgresql.bin.pg_python -h localhost -W -m timeit -s "ps=prepare('SELECT 1')" "ps.first()"
9393
Password for pg_python[pq://jwp@localhost:5432]:
9494
1000 loops, best of 3: 442 usec per loop
9595

9696
Simple interactive usage::
9797

98-
$ pg_python -h localhost -W
98+
$ python3 -m postgresql.bin.pg_python -h localhost -W
9999
Password for pg_python[pq://jwp@localhost:5432]:
100100
>>> ps = prepare('select 1')
101101
>>> ps.first()
@@ -108,8 +108,8 @@ Simple interactive usage::
108108
>>> sys.exit(0)
109109

110110

111-
``pg_dotconf``
112-
==============
111+
postgresql.bin.pg_dotconf
112+
=========================
113113

114114
pg_dotconf is used to modify a PostgreSQL cluster's configuration file.
115115
It provides a means to apply settings specified from the command line and from a
@@ -124,7 +124,7 @@ file referenced using the ``-f`` option.
124124
pg_dotconf Usage
125125
----------------
126126

127-
Usage: pg_dotconf.py [--stdout] [-f filepath] postgresql.conf ([param=val]|[param])*
127+
Usage: postgresql.bin.pg_dotconf [--stdout] [-f filepath] postgresql.conf ([param=val]|[param])*
128128

129129
Options:
130130
--version show program's version number and exit
@@ -144,19 +144,19 @@ Modifying a simple configuration file::
144144
$ echo "setting = value" >pg.conf
145145

146146
# change 'setting'
147-
$ pg_dotconf pg.conf setting=newvalue
147+
$ python3 -m postgresql.bin.pg_dotconf pg.conf setting=newvalue
148148

149149
$ cat pg.conf
150150
setting = 'newvalue'
151151

152152
# new settings are appended to the file
153-
$ pg_dotconf pg.conf another_setting=value
153+
$ python3 -m postgresql.bin.pg_dotconf pg.conf another_setting=value
154154
$ cat pg.conf
155155
setting = 'newvalue'
156156
another_setting = 'value'
157157

158158
# comment a setting
159-
$ pg_dotconf pg.conf another_setting
159+
$ python3 -m postgresql.bin.pg_dotconf pg.conf another_setting
160160

161161
$ cat pg.conf
162162
setting = 'newvalue'
@@ -165,6 +165,6 @@ Modifying a simple configuration file::
165165
When a setting is given on the command line, it must been seen as one argument
166166
to the command, so it's *very* important to avoid invocations like::
167167

168-
$ pg_dotconf pg.conf setting = value
168+
$ python3 -m postgresql.bin.pg_dotconf pg.conf setting = value
169169
ERROR: invalid setting, '=' after 'setting'
170170
HINT: Settings must take the form 'setting=value' or 'setting_name_to_comment'. Settings must also be received as a single argument.

0 commit comments

Comments
 (0)