aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2013-01-25 11:18:44 -0500
committerBruce Momjian <bruce@momjian.us>2013-01-25 11:18:57 -0500
commit88886c79cc4fc8d8f7c5b7304ad1f13508f5b025 (patch)
tree21644ed12e69a1f1a78533693907aeca07a8614a
parent89368676273a4455a20eea61b8c2f30190a223ec (diff)
downloadpostgresql-88886c79cc4fc8d8f7c5b7304ad1f13508f5b025.tar.gz
postgresql-88886c79cc4fc8d8f7c5b7304ad1f13508f5b025.zip
docs: In ecpg, clarify how username/password colon parameters are used
Backpatch to 9.2. Patch from Alan B
-rw-r--r--doc/src/sgml/ecpg.sgml5
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml
index 63aaf89b87f..bf01857a4c2 100644
--- a/doc/src/sgml/ecpg.sgml
+++ b/doc/src/sgml/ecpg.sgml
@@ -194,9 +194,12 @@ EXEC SQL CONNECT TO unix:postgresql://sql.mydomain.com/mydb AS myconnection USER
EXEC SQL BEGIN DECLARE SECTION;
const char *target = "mydb@sql.mydomain.com";
const char *user = "john";
+const char *passwd = "secret";
EXEC SQL END DECLARE SECTION;
...
-EXEC SQL CONNECT TO :target USER :user;
+EXEC SQL CONNECT TO :target USER :user USING :passwd;
+
+EXEC SQL CONNECT TO :target USER :user/:passwd;
</programlisting>
The last form makes use of the variant referred to above as
character variable reference. You will see in later sections how C