From: Tom Lane Date: Sat, 31 Aug 2019 18:05:32 +0000 (-0400) Subject: Doc: describe the "options" allowed in an ECPG connection target string. X-Git-Tag: REL9_4_25~60 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=bea87c02cee7c22afd1ea7122db85146760bc5b6;p=postgresql.git 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 --- diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml index e50584b29c0..63d2b3f87b5 100644 --- a/doc/src/sgml/ecpg.sgml +++ b/doc/src/sgml/ecpg.sgml @@ -177,6 +177,19 @@ EXEC SQL CONNECT TO target AS SQL string literal, or a reference to a character variable. + + If the connection target includes any options, + those consist of + keyword=value + specifications separated by ampersands (&). + The allowed key words are the same ones recognized + by libpq (see + ). Spaces are ignored before + any keyword or value, + though not within or after one. Note that there is no way to + write & within a value. + + The connection-name is used to handle multiple connections in one program. It can be omitted if a @@ -191,7 +204,7 @@ EXEC SQL CONNECT TO target AS secure schema usage pattern, begin each session by removing publicly-writable schemas from search_path. For example, - add options=-csearch_path= + add options=-c search_path= to options, or issue EXEC SQL SELECT pg_catalog.set_config('search_path', '', false); after connecting. This consideration is not specific to