Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit756349c

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 explainedin the docs. Per complaint from Yusuke Egashira.Discussion:https://postgr.es/m/848B1649C8A6274AA527C4472CA11EDD5FC70CBE@G01JPEXMBYT02
1 parentb61a5e6 commit756349c

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)

[8]ページ先頭

©2009-2025 Movatter.jp