Skip to content

Commit 88886c7

Browse files
committed
docs: In ecpg, clarify how username/password colon parameters are used
Backpatch to 9.2. Patch from Alan B
1 parent 8936867 commit 88886c7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

doc/src/sgml/ecpg.sgml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,12 @@ EXEC SQL CONNECT TO unix:postgresql://sql.mydomain.com/mydb AS myconnection USER
194194
EXEC SQL BEGIN DECLARE SECTION;
195195
const char *target = "mydb@sql.mydomain.com";
196196
const char *user = "john";
197+
const char *passwd = "secret";
197198
EXEC SQL END DECLARE SECTION;
198199
...
199-
EXEC SQL CONNECT TO :target USER :user;
200+
EXEC SQL CONNECT TO :target USER :user USING :passwd;
201+
202+
EXEC SQL CONNECT TO :target USER :user/:passwd;
200203
</programlisting>
201204
The last form makes use of the variant referred to above as
202205
character variable reference. You will see in later sections how C

0 commit comments

Comments
 (0)