Duplicated docs on libpq parameters
Duplicated docs on libpq parameters
От:
Magnus Hagander <magnus@hagander.net>
Дата:
There seems to be a lot of duplication in the libpq documentation between the connection string parameters and the environment variables. They are close to identical but not exactly (for example, there is a "and vs or" change in PGSSLMODE/sslmode). Any reason not to just have the environment variable documentation refer back to the connection option documentation? //Magnus
Re: Duplicated docs on libpq parameters
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Magnus Hagander writes: > Any reason not to just have the environment variable documentation refer > back to the connection option documentation? Well, not all of 'em are connection options. I could see documenting the connection options more like the GUC-variable options, ie a few words and a reference to the underlying option. Or is that what you meant? regards, tom lane
Re: Duplicated docs on libpq parameters
От:
Magnus Hagander <magnus@hagander.net>
Дата:
Tom Lane wrote: > Magnus Hagander writes: >> Any reason not to just have the environment variable documentation refer >> back to the connection option documentation? > > Well, not all of 'em are connection options. > > I could see documenting the connection options more like the > GUC-variable options, ie a few words and a reference to the underlying > option. Or is that what you meant? Well, I was mostly thinking like: PGSSLMODE This corresponds to the sslmode connection option. Then for those that aren't connection options, we'd keep the full description. I'm not advocating we remove the whole chapter, just the duplicated stuff. (I assume we can make the link above go directly to the description for the option?) //Magnus
Re: Duplicated docs on libpq parameters
От:
Alvaro Herrera <alvherre@commandprompt.com>
Дата:
Magnus Hagander wrote: > Well, I was mostly thinking like: > PGSSLMODE > This corresponds to the sslmode connection option. > > Then for those that aren't connection options, we'd keep the full > description. I'm not advocating we remove the whole chapter, just the > duplicated stuff. (I assume we can make the link above go directly to > the description for the option?) You might need to add some extra id=foo attributes in the sslmode option if they're not there already, but it should work. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.
Re: Duplicated docs on libpq parameters
От:
Bruce Momjian <bruce@momjian.us>
Дата:
Magnus Hagander wrote:
> Tom Lane wrote:
> > Magnus Hagander writes:
> >> Any reason not to just have the environment variable documentation refer
> >> back to the connection option documentation?
> >
> > Well, not all of 'em are connection options.
> >
> > I could see documenting the connection options more like the
> > GUC-variable options, ie a few words and a reference to the underlying
> > option. Or is that what you meant?
>
> Well, I was mostly thinking like:
> PGSSLMODE
> This corresponds to the sslmode connection option.
>
> Then for those that aren't connection options, we'd keep the full
> description. I'm not advocating we remove the whole chapter, just the
> duplicated stuff. (I assume we can make the link above go directly to
> the description for the option?)
Done, with attached, applied patch.
--
Bruce Momjian http://momjian.us
EnterpriseDB http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Index: doc/src/sgml/libpq.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v
retrieving revision 1.274
diff -c -c -r1.274 libpq.sgml
*** doc/src/sgml/libpq.sgml 15 Dec 2008 10:28:21 -0000 1.274
--- doc/src/sgml/libpq.sgml 10 Jan 2009 20:09:58 -0000
***************
*** 101,107 ****
The currently recognized parameter key words are:
!
host
--- 101,107 ----
The currently recognized parameter key words are:
!
host
***************
*** 119,125 ****
!
hostaddr
--- 119,125 ----
!
hostaddr
***************
*** 160,166 ****
!
port
--- 160,166 ----
!
port
***************
*** 171,177 ****
!
dbname
--- 171,177 ----
!
dbname
***************
*** 180,186 ****
!
user
--- 180,186 ----
!
user
***************
*** 191,197 ****
!
password
--- 191,197 ----
!
password
***************
*** 200,206 ****
!
connect_timeout
--- 200,206 ----
!
connect_timeout
***************
*** 211,226 ****
!
options
! Command-line options to be sent to the server.
!
tty
--- 211,230 ----
!
options
! Adds command-line options to send to the server at run-time.
! For example, setting this to -c geqo=off</> sets the
! session's value of the geqo</> parameter to
! off</>. For a detailed discussion of the available
! options, consult .
!
tty
***************
*** 229,235 ****
!
sslmode
--- 233,239 ----
!
sslmode
***************
*** 259,265 ****
!
sslverify
--- 263,269 ----
!
sslverify
***************
*** 295,301 ****
!
requiressl
--- 299,305 ----
!
requiressl
***************
*** 317,323 ****
!
sslcert
--- 321,327 ----
!
sslcert
***************
*** 327,333 ****
!
sslkey
--- 331,337 ----
!
sslkey
***************
*** 342,348 ****
!
sslrootcert
--- 346,352 ----
!
sslrootcert
***************
*** 351,357 ****
!
sslcrl
--- 355,361 ----
!
sslcrl
***************
*** 361,367 ****
!
krbsrvname
--- 365,371 ----
!
krbsrvname
***************
*** 374,380 ****
!
gsslib
--- 378,384 ----
!
gsslib
***************
*** 385,391 ****
!
service
--- 389,395 ----
!
service
***************
*** 5627,5637 ****
PGHOST
! PGHOST sets the database server name.
! If this begins with a slash, it specifies Unix-domain communication
! rather than TCP/IP communication; the value is then the name of the
! directory in which the socket file is stored (in a default installation
! setup this would be /tmp).
--- 5631,5638 ----
PGHOST
! PGHOST behaves the same as connection parameter.
***************
*** 5640,5656 ****
PGHOSTADDR
! PGHOSTADDR specifies the numeric IP address of the database
! server. This can be set instead of or in addition to PGHOST
! to avoid DNS lookup overhead. See the documentation of
! these parameters, under PQconnectdb above, for details
! on their interaction.
!
!
! When neither PGHOST nor PGHOSTADDR is set,
! the default behavior is to connect using a local Unix-domain socket; or on
! machines without Unix-domain sockets, libpq will
! attempt to connect to localhost</>.
--- 5641,5650 ----
PGHOSTADDR
! PGHOSTADDR behaves the same as connection parameter.
! This can be set instead of or in addition to PGHOST
! to avoid DNS lookup overhead.
***************
*** 5659,5667 ****
PGPORT
! PGPORT sets the TCP port number or Unix-domain socket
! file extension for communicating with the
! PostgreSQL server.
--- 5653,5660 ----
PGPORT
! PGPORT behaves the same as connection parameter.
***************
*** 5670,5678 ****
PGDATABASE
! PGDATABASE sets the
! PostgreSQL database name.
!
--- 5663,5671 ----
PGDATABASE
! PGDATABASE behaves the same as connection parameter.
!
***************
*** 5680,5686 ****
PGUSER
! PGUSER sets the user name used to connect to the
database.
--- 5673,5680 ----
PGUSER
! PGUSER behaves the same as connection parameter.
database.
***************
*** 5690,5700 ****
PGPASSWORD
! PGPASSWORD sets the password used if the server
! demands password authentication. Use of this environment variable
is not recommended for security reasons (some operating systems
allow non-root users to see process environment variables via
! ps</>); instead consider using the
~/.pgpass</> file (see ).
--- 5684,5695 ----
PGPASSWORD
! PGPASSWORD behaves the same as connection parameter.
! Use of this environment variable
is not recommended for security reasons (some operating systems
allow non-root users to see process environment variables via
! ps</>); instead consider using the
~/.pgpass</> file (see ).
***************
*** 5715,5724 ****
PGSERVICE
! PGSERVICE
! sets the service name to be looked up in
! pg_service.conf. This offers a shorthand way
! of setting all the parameters.
--- 5710,5717 ----
PGSERVICE
! PGSERVICE behaves the same as connection parameter.
***************
*** 5727,5738 ****
PGREALM
! PGREALM sets the Kerberos realm to use with
PostgreSQL, if it is different from the
local realm. If PGREALM is set,
! libpq applications will attempt
authentication with servers for this realm and use separate ticket
! files to avoid conflicts with local ticket files. This
environment variable is only used if Kerberos authentication is
selected by the server.
--- 5720,5731 ----
PGREALM
! PGREALM sets the Kerberos realm to use with
PostgreSQL, if it is different from the
local realm. If PGREALM is set,
! libpq applications will attempt
authentication with servers for this realm and use separate ticket
! files to avoid conflicts with local ticket files. This
environment variable is only used if Kerberos authentication is
selected by the server.
***************
*** 5743,5754 ****
PGOPTIONS
! PGOPTIONS sets additional run-time options for the
! PostgreSQL server. For example, setting
! PGOPTIONS to -c geqo=off</> sets the session's
! value of the geqo</> parameter to off</>.
! For a detailed discussion of the available options consult .
--- 5736,5743 ----
PGOPTIONS
! PGOPTIONS behaves the same as connection parameter.
***************
*** 5757,5776 ****
PGSSLMODE
! PGSSLMODE determines whether and with what priority
! an SSL</> connection will be negotiated with the server.
! There are four modes: disable</> will attempt only an
! unencrypted SSL</> connection; allow</> will
! negotiate, trying first a non-SSL</> connection, then if
! that fails, trying an SSL</> connection; prefer</>
! (the default) will negotiate, trying first an SSL</>
! connection, then if that fails, trying a regular non-SSL</>
! connection; require</> will try only an SSL</>
! connection. If PostgreSQL</> is compiled without SSL
! support, using option require</> will cause an error, while
! options allow</> and prefer</> will be accepted
! but libpq</> will not in fact attempt an SSL</>
! connection.
--- 5746,5753 ----
PGSSLMODE
! PGSSLMODE behaves the same as connection parameter.
***************
*** 5779,5792 ****
PGSSLVERIFY
! PGSSLVERIFY controls how libpq verifies the certificate on the
! server when performing an SSL</> connection. There are
! three options: none</> disables verification completely
! (not recommended!); cert</> enables verification that
! the certificate chains to a known CA only; cn</> will
! both verify that the certificate chains to a known CA and that
! the cn</> attribute of the certificate matches the
! hostname the connection is being made to (default).
--- 5756,5763 ----
PGSSLVERIFY
! PGSSLVERIFY behaves the same as connection parameter.
***************
*** 5795,5807 ****
PGREQUIRESSL
! PGREQUIRESSL sets whether or not the connection must
! be made over SSL. If set to 1,
! libpq</> will refuse to connect if the server does not
! accept an SSL connection (equivalent to
! sslmode</> prefer</>). This option is deprecated
! in favor of the sslmode</> setting, and is only available
! if PostgreSQL</> is compiled with SSL support.
--- 5766,5773 ----
PGREQUIRESSL
! PGREQUIRESSL behaves the same as connection parameter.
***************
*** 5810,5817 ****
PGSSLCERT
! PGSSLCERT specifies the location for the client
! certificate to use if the server requests one.
--- 5776,5783 ----
PGSSLCERT
! PGSSLCERT behaves the same as connection parameter.
***************
*** 5820,5832 ****
PGSSLKEY
! PGSSLKEY specifies the location for the secret key
! used for the client certificate. It can either specify a filename
! that will be used instead of the default
! ~/.postgresql/postgresql.key</>, or can specify an external
! engine (engines are OpenSSL</> loadable modules). The
! external engine specification should consist of a colon-separated
! engine name and an engine-specific key identifier.
--- 5786,5793 ----
PGSSLKEY
! PGSSLKEY behaves the same as connection parameter.
***************
*** 5835,5842 ****
PGSSLROOTCERT
! PGSSLROOTCERT specifies the file name where the SSL
! root certificate is stored.
--- 5796,5803 ----
PGSSLROOTCERT
! PGSSLROOTCERT behaves the same as connection parameter.
***************
*** 5845,5852 ****
PGSSLCRL
! PGSSLCRL specifies the file name where the SSL certificate
! revocation list is stored.
--- 5806,5813 ----
PGSSLCRL
! PGSSLCRL behaves the same as connection parameter.
***************
*** 5855,5862 ****
PGKRBSRVNAME
! PGKRBSRVNAME sets the Kerberos service name to use
! when authenticating with Kerberos 5 or GSSAPI.
--- 5816,5823 ----
PGKRBSRVNAME
! PGKRBSRVNAME behaves the same as connection parameter.
***************
*** 5865,5872 ****
PGGSSLIB
! PGGSSLIB sets the GSS library to use for GSSAPI
! authentication.
--- 5826,5833 ----
PGGSSLIB
! PGGSSLIB behaves the same as connection parameter.
***************
*** 5875,5886 ****
PGCONNECT_TIMEOUT
! PGCONNECT_TIMEOUT sets the maximum number of seconds
! that libpq will wait when attempting to
! connect to the PostgreSQL server. If
! unset or set to zero, libpq will wait
! indefinitely. It is not recommended to set the timeout to less than
! 2 seconds.
--- 5836,5843 ----
PGCONNECT_TIMEOUT
! PGCONNECT_TIMEOUT behaves the same as connection parameter.