aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2020-01-19 18:55:51 +0900
committerMichael Paquier <michael@paquier.xyz>2020-01-19 18:55:51 +0900
commite0ed6817c0ee218a3681920807404603e042ff04 (patch)
treee8cd6ab70b8e9e3c6dcba08ef054219314133daa
parent34a0a81bfb388504deaa51b16a8bb531b827e519 (diff)
downloadpostgresql-e0ed6817c0ee218a3681920807404603e042ff04.tar.gz
postgresql-e0ed6817c0ee218a3681920807404603e042ff04.zip
Doc: Improve description of connection strings with Percent-encoding
Clarify the description related to the use of characters which can be encoded, and add an example. Author: Jobin Augustine Reviewed-by: Peter Eisentraut, Alvaro Herrera, Heikki Linnakangas, Michael Paquier, Alex Shulgin Discussion: https://postgr.es/m/CANaTPsrYgSgE2fuj3=4x=Jmx1c+NgkEDzftNknZbrMuqL+aBhQ@mail.gmail.com
-rw-r--r--doc/src/sgml/libpq.sgml13
1 files changed, 9 insertions, 4 deletions
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index 64cff49c4d7..fcbf7fafbd9 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -925,10 +925,15 @@ postgresql:///mydb?host=localhost&amp;port=5433
</para>
<para>
- Percent-encoding may be used to include symbols with special meaning in any
- of the <acronym>URI</acronym> parts, e.g. replace <literal>=</literal> with
- <literal>%3D</literal>.
-
+ Connection <acronym>URI</acronym> needs to be encoded with
+ <ulink url="https://tools.ietf.org/html/rfc3986#section-2.1">Percent-encoding</ulink>
+ if it includes symbols with special meaning in any of its parts.
+ Here is an example where equal sign (<literal>=</literal>) is replaced
+ with <literal>%3D</literal> and whitespace character with
+ <literal>%20</literal>:
+<programlisting>
+postgresql://user@localhost:5433/mydb?options=-c%20synchronous_commit%3Doff
+</programlisting>
</para>
<para>