mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-12 15:39:35 +08:00
docs: In ecpg, clarify how username/password colon parameters are used
Backpatch to 9.2. Patch from Alan B
This commit is contained in:
parent
8936867627
commit
88886c79cc
@ -194,9 +194,12 @@ EXEC SQL CONNECT TO unix:postgresql://sql.mydomain.com/mydb AS myconnection USER
|
|||||||
EXEC SQL BEGIN DECLARE SECTION;
|
EXEC SQL BEGIN DECLARE SECTION;
|
||||||
const char *target = "mydb@sql.mydomain.com";
|
const char *target = "mydb@sql.mydomain.com";
|
||||||
const char *user = "john";
|
const char *user = "john";
|
||||||
|
const char *passwd = "secret";
|
||||||
EXEC SQL END DECLARE SECTION;
|
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>
|
</programlisting>
|
||||||
The last form makes use of the variant referred to above as
|
The last form makes use of the variant referred to above as
|
||||||
character variable reference. You will see in later sections how C
|
character variable reference. You will see in later sections how C
|
||||||
|
Loading…
Reference in New Issue
Block a user