Re: Add clarification example to EXEC SQL CONNECT with password
От | Tom Lane |
---|---|
Тема | Re: Add clarification example to EXEC SQL CONNECT with password |
Дата | |
Msg-id | 14376.1359134732@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Add clarification example to EXEC SQL CONNECT with password (Bruce Momjian <bruce@momjian.us>) |
Ответы |
Re: Add clarification example to EXEC SQL CONNECT with
password
|
Список | pgsql-docs |
Bruce Momjian <bruce@momjian.us> writes: > *** a/doc/src/sgml/ecpg.sgml > --- b/doc/src/sgml/ecpg.sgml > *************** EXEC SQL CONNECT TO unix:postgresql://sq > *** 194,202 **** > EXEC SQL BEGIN DECLARE SECTION; > const char *target = "mydb@sql.mydomain.com"; > const char *user = "john"; > EXEC SQL END DECLARE SECTION; > ... > ! EXEC SQL CONNECT TO :target USER :user; > </programlisting> > The last form makes use of the variant referred to above as > character variable reference. You will see in later sections how C > --- 194,205 ---- > 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 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 This sure looks like it has broken the intention of the paragraph immediately after the example. Also, it seems like you are providing two alternative ways of doing the same thing, but not explaining that. How is a reader supposed to know that he doesn't have to do both commands? regards, tom lane
В списке pgsql-docs по дате отправления: