projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a33c004
)
docs: In ecpg, clarify how username/password colon parameters are used
author
Bruce Momjian
<
[email protected]
>
Fri, 25 Jan 2013 16:18:44 +0000
(11:18 -0500)
committer
Bruce Momjian
<
[email protected]
>
Fri, 25 Jan 2013 16:18:44 +0000
(11:18 -0500)
Backpatch to 9.2.
Patch from Alan B
doc/src/sgml/ecpg.sgml
patch
|
blob
|
blame
|
history
diff --git
a/doc/src/sgml/ecpg.sgml
b/doc/src/sgml/ecpg.sgml
index 63aaf89b87fb7a5b7f036b704a23625bafeb14a2..bf01857a4c2432851069f6ffe6da9271133cbc56 100644
(file)
--- 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 = "
[email protected]
";
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