Re: Add clarification example to EXEC SQL CONNECT with password

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Alan B <alan77codebits(at)gmail(dot)com>, pgsql-docs(at)postgresql(dot)org
Subject: Re: Add clarification example to EXEC SQL CONNECT with password
Date: 2013-01-25 17:25:32
Message-ID: 14376.1359134732@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Bruce Momjian <bruce(at)momjian(dot)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(at)sql(dot)mydomain(dot)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(at)sql(dot)mydomain(dot)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

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Bruce Momjian 2013-01-25 17:29:59 Re: Add clarification example to EXEC SQL CONNECT with password
Previous Message Bruce Momjian 2013-01-25 16:19:42 Re: Add clarification example to EXEC SQL CONNECT with password