summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2019-08-31 14:05:32 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2019-08-31 14:05:32 -0400
commit9230cc706df03ca63ee7e6ce3c9573a71937e245 (patch)
treeb97d520600fa31fb44461bd1c8537e9fdb41becc /doc/src
parent7561782320f707db87f26014cd9122239f552682 (diff)
Doc: describe the "options" allowed in an ECPG connection target string.
These have been there a long time, but their format was never explained in the docs. Per complaint from Yusuke Egashira. Discussion: https://postgr.es/m/848B1649C8A6274AA527C4472CA11EDD5FC70CBE@G01JPEXMBYT02
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ecpg.sgml15
1 files changed, 14 insertions, 1 deletions
diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml
index 4c3896f5c5b..ced3d1b000a 100644
--- a/doc/src/sgml/ecpg.sgml
+++ b/doc/src/sgml/ecpg.sgml
@@ -178,6 +178,19 @@ EXEC SQL CONNECT TO <replaceable>target</replaceable> <optional>AS <replaceable>
</para>
<para>
+ If the connection target includes any <replaceable>options</replaceable>,
+ those consist of
+ <literal><replaceable>keyword</replaceable>=<replaceable>value</replaceable></literal>
+ specifications separated by ampersands (<literal>&amp;</literal>).
+ The allowed key words are the same ones recognized
+ by <application>libpq</application> (see
+ <xref linkend="libpq-paramkeywords">). Spaces are ignored before
+ any <replaceable>keyword</replaceable> or <replaceable>value</replaceable>,
+ though not within or after one. Note that there is no way to
+ write <literal>&amp;</literal> within a <replaceable>value</replaceable>.
+ </para>
+
+ <para>
The <replaceable>connection-name</replaceable> is used to handle
multiple connections in one program. It can be omitted if a
program uses only one connection. The most recently opened
@@ -191,7 +204,7 @@ EXEC SQL CONNECT TO <replaceable>target</replaceable> <optional>AS <replaceable>
<link linkend="ddl-schemas-patterns">secure schema usage pattern</link>,
begin each session by removing publicly-writable schemas
from <varname>search_path</varname>. For example,
- add <literal>options=-csearch_path=</literal>
+ add <literal>options=-c search_path=</literal>
to <literal><replaceable>options</replaceable></literal>, or
issue <literal>EXEC SQL SELECT pg_catalog.set_config('search_path', '',
false);</literal> after connecting. This consideration is not specific to