Skip to content

Commit 756349c

Browse files
committed
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
1 parent b61a5e6 commit 756349c

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

doc/src/sgml/ecpg.sgml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,19 @@ EXEC SQL CONNECT TO <replaceable>target</replaceable> <optional>AS <replaceable>
177177
SQL string literal, or a reference to a character variable.
178178
</para>
179179

180+
<para>
181+
If the connection target includes any <replaceable>options</replaceable>,
182+
those consist of
183+
<literal><replaceable>keyword</replaceable>=<replaceable>value</replaceable></literal>
184+
specifications separated by ampersands (<literal>&amp;</literal>).
185+
The allowed key words are the same ones recognized
186+
by <application>libpq</application> (see
187+
<xref linkend="libpq-paramkeywords"/>). Spaces are ignored before
188+
any <replaceable>keyword</replaceable> or <replaceable>value</replaceable>,
189+
though not within or after one. Note that there is no way to
190+
write <literal>&amp;</literal> within a <replaceable>value</replaceable>.
191+
</para>
192+
180193
<para>
181194
The <replaceable>connection-name</replaceable> is used to handle
182195
multiple connections in one program. It can be omitted if a
@@ -191,7 +204,7 @@ EXEC SQL CONNECT TO <replaceable>target</replaceable> <optional>AS <replaceable>
191204
<link linkend="ddl-schemas-patterns">secure schema usage pattern</link>,
192205
begin each session by removing publicly-writable schemas
193206
from <varname>search_path</varname>. For example,
194-
add <literal>options=-csearch_path=</literal>
207+
add <literal>options=-c search_path=</literal>
195208
to <literal><replaceable>options</replaceable></literal>, or
196209
issue <literal>EXEC SQL SELECT pg_catalog.set_config('search_path', '',
197210
false);</literal> after connecting. This consideration is not specific to

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy