mirror of
https://github.com/postgres/postgres.git
synced 2025-05-06 19:59:18 +03:00
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
This commit is contained in:
parent
b61a5e6a1f
commit
756349c87b
@ -177,6 +177,19 @@ EXEC SQL CONNECT TO <replaceable>target</replaceable> <optional>AS <replaceable>
|
|||||||
SQL string literal, or a reference to a character variable.
|
SQL string literal, or a reference to a character variable.
|
||||||
</para>
|
</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>&</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>&</literal> within a <replaceable>value</replaceable>.
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The <replaceable>connection-name</replaceable> is used to handle
|
The <replaceable>connection-name</replaceable> is used to handle
|
||||||
multiple connections in one program. It can be omitted if a
|
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>
|
|||||||
<link linkend="ddl-schemas-patterns">secure schema usage pattern</link>,
|
<link linkend="ddl-schemas-patterns">secure schema usage pattern</link>,
|
||||||
begin each session by removing publicly-writable schemas
|
begin each session by removing publicly-writable schemas
|
||||||
from <varname>search_path</varname>. For example,
|
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
|
to <literal><replaceable>options</replaceable></literal>, or
|
||||||
issue <literal>EXEC SQL SELECT pg_catalog.set_config('search_path', '',
|
issue <literal>EXEC SQL SELECT pg_catalog.set_config('search_path', '',
|
||||||
false);</literal> after connecting. This consideration is not specific to
|
false);</literal> after connecting. This consideration is not specific to
|
||||||
|
Loading…
x
Reference in New Issue
Block a user