From alan77codebits@gmail.com Sun May 31 23:44:38 2026 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TEjRI-0004Jt-A2 for pgsql-docs@postgresql.org; Thu, 20 Sep 2012 16:17:20 +0000 Received: from mail-ee0-f46.google.com ([74.125.83.46]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TEjRE-0003AC-D4 for pgsql-docs@postgresql.org; Thu, 20 Sep 2012 16:17:19 +0000 Received: by eekc1 with SMTP id c1so1028973eek.19 for ; Thu, 20 Sep 2012 09:17:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=XQ6Y+vaoR4yLDnpNA5qYSboNXbb75uQcpKtaIp//shw=; b=0nTsZUhvWSySHo8ycSHRRN9XIcvKKQKrLaLVZrKUFC+mX5Hrf54vEy6z3pMpYMEPnx lB5AFrnz6KIYTUlC9kLXVPBAkWwXagujWi3SXtklzOrnnHZ2w6bPDc1QID4Pi+hO5UyB 4W7imt66KEAMmrDetbKKgu21IH9df/Gjlq3aUphUotJoWwim06VbXdYrgu4FDWk+LW21 YerGlLGjarZk+uPvi1pHVheq/w+Y7Ffk7hyqJat1bRrMN87DTYQbBjbs8aFlYNd2Zdf2 VUNNCp1c/fc7EPaQ7vyUYQHnEpcI0/l2SwccVV8in4mULVSLFzootBvi7r406oXC7FUi vK7w== MIME-Version: 1.0 Received: by 10.14.181.132 with SMTP id l4mr2927890eem.17.1348157835435; Thu, 20 Sep 2012 09:17:15 -0700 (PDT) Received: by 10.14.199.130 with HTTP; Thu, 20 Sep 2012 09:17:15 -0700 (PDT) Date: Thu, 20 Sep 2012 18:17:15 +0200 Message-ID: Subject: Add clarification example to EXEC SQL CONNECT with password From: Alan B To: pgsql-docs@postgresql.org Content-Type: multipart/alternative; boundary=047d7b343db6e1deee04ca24748a X-Pg-Spam-Score: -2.7 (--) X-Archive-Number: 201209/20 X-Sequence-Number: 7472 --047d7b343db6e1deee04ca24748a Content-Type: text/plain; charset=ISO-8859-1 Hi list, Hope this is the right place to suggest that change in the docs, otherwise is there a ticket management system for this stuff somewhere? Paying attention to the documentation at http://www.postgresql.org/docs/8.4/static/ecpg-connect.html and subsequent versions of the page (I am using 8.4), there is the option to specify "user-name" in various ways. However this may be confused as a single parameter to the connect string while it is a combination of 1 or 2 parameters that cannot go into a single string. To avoid confusion I suggest providing a complete example in "Here are some examples of CONNECT statements:" as follows: EXEC SQL CONNECT TO mydb@sql.mydomain.com; EXEC SQL CONNECT TO unix:postgresql://sql.mydomain.com/mydb AS myconnection USER john; 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; or EXEC SQL CONNECT TO :target USER :user/:passwd; To make the distinction of parameters and string variables evident. Alan --047d7b343db6e1deee04ca24748a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi list,
Hope this is the right place to suggest that change in the docs= , otherwise is there a ticket management system for this stuff somewhere?
Paying attention to the documentation at http://www.postgresql.org/docs/= 8.4/static/ecpg-connect.html and subsequent versions of the page (I am = using 8.4), there is the option to specify "user-name" in various= ways. However this may be confused as a single parameter to the connect st= ring while it is a combination of 1 or 2 parameters that cannot go into a s= ingle string.

To avoid confusion I suggest providing a complete example in "Here= are some examples of CONNECT statements:" as follows:

EXEC S=
QL CONNECT TO mydb@sql.mydomain.co=
m;

EXEC SQL CONNECT TO unix:postgresql://sql.mydomain.com/mydb AS myconnection USER john;

EXEC SQL BEGIN DECLARE SECTION;
const char *target =3D "mydb@=
sql.mydomain.com";
const char *user =3D "john";
const char *passwd =3D "secret";
EXEC SQL END DECLARE SECTION;
 ...

EXEC SQL CONNECT TO :target USER :user USING :passwd;
or
EXEC SQ= L CONNECT TO :target USER :user/:passwd;
To make the distinction o= f parameters and string variables evident.

Alan

--047d7b343db6e1deee04ca24748a-- From bruce@momjian.us Sun May 31 23:44:38 2026 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tym0K-000712-ED for pgsql-docs@arkaria.postgresql.org; Fri, 25 Jan 2013 16:19:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Tym0J-0001mg-T6 for pgsql-docs@arkaria.postgresql.org; Fri, 25 Jan 2013 16:19:47 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tym0G-0001k8-FO for pgsql-docs@postgresql.org; Fri, 25 Jan 2013 16:19:44 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tym0E-0003hz-Tf for pgsql-docs@postgresql.org; Fri, 25 Jan 2013 16:19:43 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1Tym0E-0003vf-GK; Fri, 25 Jan 2013 11:19:42 -0500 Date: Fri, 25 Jan 2013 11:19:42 -0500 From: Bruce Momjian To: Alan B Cc: pgsql-docs@postgresql.org Subject: Re: Add clarification example to EXEC SQL CONNECT with password Message-ID: <20130125161942.GA6848@momjian.us> References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="LZvS9be/3tNcYl/X" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org --LZvS9be/3tNcYl/X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Sep 20, 2012 at 06:17:15PM +0200, Alan B wrote: > Hi list, > Hope this is the right place to suggest that change in the docs, otherwise is > there a ticket management system for this stuff somewhere? > > Paying attention to the documentation at http://www.postgresql.org/docs/8.4/ > static/ecpg-connect.html and subsequent versions of the page (I am using 8.4), > there is the option to specify "user-name" in various ways. However this may be > confused as a single parameter to the connect string while it is a combination > of 1 or 2 parameters that cannot go into a single string. > > To avoid confusion I suggest providing a complete example in "Here are some > examples of CONNECT statements:" as follows: > > > EXEC SQL CONNECT TO mydb@sql.mydomain.com; > > EXEC SQL CONNECT TO unix:postgresql://sql.mydomain.com/mydb AS myconnection USER john; > > 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; > or > EXEC SQL CONNECT TO :target USER :user/:passwd; > > To make the distinction of parameters and string variables evident. I had a look at this just now, and you are right that it is very confusing. I couldn't even figure out how to explain it in text, and agree that your example is the best solution. Attached patch applied to git head and 9.2. Thanks. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. + --LZvS9be/3tNcYl/X Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="ecpg.diff" diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml new file mode 100644 index 63aaf89..bf01857 *** 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; 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; The last form makes use of the variant referred to above as character variable reference. You will see in later sections how C --LZvS9be/3tNcYl/X Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs --LZvS9be/3tNcYl/X-- From tgl@sss.pgh.pa.us Sun May 31 23:44:38 2026 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tyn28-0002Jk-NH for pgsql-docs@arkaria.postgresql.org; Fri, 25 Jan 2013 17:25:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Tyn27-0000JB-Mc for pgsql-docs@arkaria.postgresql.org; Fri, 25 Jan 2013 17:25:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tyn20-0000DO-Sn for pgsql-docs@postgresql.org; Fri, 25 Jan 2013 17:25:36 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tyn1y-00030c-S1 for pgsql-docs@postgresql.org; Fri, 25 Jan 2013 17:25:36 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r0PHPWrg014377; Fri, 25 Jan 2013 12:25:32 -0500 (EST) From: Tom Lane To: Bruce Momjian cc: Alan B , pgsql-docs@postgresql.org Subject: Re: Add clarification example to EXEC SQL CONNECT with password In-reply-to: <20130125161942.GA6848@momjian.us> References: <20130125161942.GA6848@momjian.us> Comments: In-reply-to Bruce Momjian message dated "Fri, 25 Jan 2013 11:19:42 -0500" Date: Fri, 25 Jan 2013 12:25:32 -0500 Message-ID: <14376.1359134732@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org Bruce Momjian 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; > > 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; > > 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 -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs From bruce@momjian.us Sun May 31 23:44:38 2026 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tyn6P-0002XT-La for pgsql-docs@arkaria.postgresql.org; Fri, 25 Jan 2013 17:30:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Tyn6P-0001XI-5W for pgsql-docs@arkaria.postgresql.org; Fri, 25 Jan 2013 17:30:09 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tyn6O-0001XB-MU for pgsql-docs@postgresql.org; Fri, 25 Jan 2013 17:30:08 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tyn6H-000323-N7 for pgsql-docs@postgresql.org; Fri, 25 Jan 2013 17:30:08 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1Tyn6F-0000xP-SV; Fri, 25 Jan 2013 12:29:59 -0500 Date: Fri, 25 Jan 2013 12:29:59 -0500 From: Bruce Momjian To: Tom Lane Cc: Alan B , pgsql-docs@postgresql.org Subject: Re: Add clarification example to EXEC SQL CONNECT with password Message-ID: <20130125172959.GB6848@momjian.us> References: <20130125161942.GA6848@momjian.us> <14376.1359134732@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <14376.1359134732@sss.pgh.pa.us> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org On Fri, Jan 25, 2013 at 12:25:32PM -0500, Tom Lane wrote: > Bruce Momjian 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; > > > > 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; > > > > 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? Yeah, I was worried about that, so I added the blank line. If you look at the docs, we already are providing three connection examples, so now there are four. You can see the current docs here (the official ones are not updated yet): http://momjian.us/pgsql_docs/ecpg-connect.html#ECPG-CONNECTING I am open to suggestions. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. + -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs From tgl@sss.pgh.pa.us Sun May 31 23:44:38 2026 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TynPs-0003Y7-Ux for pgsql-docs@arkaria.postgresql.org; Fri, 25 Jan 2013 17:50:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TynPs-0004J5-CQ for pgsql-docs@arkaria.postgresql.org; Fri, 25 Jan 2013 17:50:16 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TynPr-0004IG-Bn for pgsql-docs@postgresql.org; Fri, 25 Jan 2013 17:50:15 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TynPq-00052l-BO for pgsql-docs@postgresql.org; Fri, 25 Jan 2013 17:50:14 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r0PHoCgb014934; Fri, 25 Jan 2013 12:50:12 -0500 (EST) From: Tom Lane To: Bruce Momjian cc: Alan B , pgsql-docs@postgresql.org Subject: Re: Add clarification example to EXEC SQL CONNECT with password In-reply-to: <20130125172959.GB6848@momjian.us> References: <20130125161942.GA6848@momjian.us> <14376.1359134732@sss.pgh.pa.us> <20130125172959.GB6848@momjian.us> Comments: In-reply-to Bruce Momjian message dated "Fri, 25 Jan 2013 12:29:59 -0500" Date: Fri, 25 Jan 2013 12:50:12 -0500 Message-ID: <14933.1359136212@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org Bruce Momjian writes: > On Fri, Jan 25, 2013 at 12:25:32PM -0500, Tom Lane wrote: >>> ! EXEC SQL CONNECT TO :target USER :user USING :passwd; >>> ! >>> ! EXEC SQL CONNECT TO :target USER :user/:passwd; >> 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? > Yeah, I was worried about that, so I added the blank line. If you look > at the docs, we already are providing three connection examples, so now > there are four. You can see the current docs here (the official ones > are not updated yet): > http://momjian.us/pgsql_docs/ecpg-connect.html#ECPG-CONNECTING > I am open to suggestions. (looks at the whole section) As-is, it's definitely not good, because before there were three independent examples, and now there are three and a half --- the added example depends on the variables declared in the third example. But using the blank line means you've formatted it as a stand-alone fourth example, which is not only wrong in itself but it screws up the meanings of both of the subsequent paragraphs. Perhaps changing that blank line to something like " /* or */" would help? Then it would look more like an alternative within the same example, which would also help with making the following two paras still be sensible. regards, tom lane -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs From bruce@momjian.us Sun May 31 23:44:38 2026 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tyns6-0005O2-3v for pgsql-docs@arkaria.postgresql.org; Fri, 25 Jan 2013 18:19:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Tyns5-0006EE-Ks for pgsql-docs@arkaria.postgresql.org; Fri, 25 Jan 2013 18:19:25 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tyns4-0006E9-Td for pgsql-docs@postgresql.org; Fri, 25 Jan 2013 18:19:25 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tyns2-0005VZ-Sm for pgsql-docs@postgresql.org; Fri, 25 Jan 2013 18:19:24 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1Tyns1-00045D-GR; Fri, 25 Jan 2013 13:19:21 -0500 Date: Fri, 25 Jan 2013 13:19:21 -0500 From: Bruce Momjian To: Tom Lane Cc: Alan B , pgsql-docs@postgresql.org Subject: Re: Add clarification example to EXEC SQL CONNECT with password Message-ID: <20130125181921.GD6848@momjian.us> References: <20130125161942.GA6848@momjian.us> <14376.1359134732@sss.pgh.pa.us> <20130125172959.GB6848@momjian.us> <14933.1359136212@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Y5rl02BVI9TCfPar" Content-Disposition: inline In-Reply-To: <14933.1359136212@sss.pgh.pa.us> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org --Y5rl02BVI9TCfPar Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jan 25, 2013 at 12:50:12PM -0500, Tom Lane wrote: > Bruce Momjian writes: > > On Fri, Jan 25, 2013 at 12:25:32PM -0500, Tom Lane wrote: > >>> ! EXEC SQL CONNECT TO :target USER :user USING :passwd; > >>> ! > >>> ! EXEC SQL CONNECT TO :target USER :user/:passwd; > > >> 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? > > > Yeah, I was worried about that, so I added the blank line. If you look > > at the docs, we already are providing three connection examples, so now > > there are four. You can see the current docs here (the official ones > > are not updated yet): > > http://momjian.us/pgsql_docs/ecpg-connect.html#ECPG-CONNECTING > > I am open to suggestions. > > (looks at the whole section) As-is, it's definitely not good, because > before there were three independent examples, and now there are three > and a half --- the added example depends on the variables declared in > the third example. But using the blank line means you've formatted it > as a stand-alone fourth example, which is not only wrong in itself but > it screws up the meanings of both of the subsequent paragraphs. > > Perhaps changing that blank line to something like " /* or */" would > help? Then it would look more like an alternative within the same > example, which would also help with making the following two paras > still be sensible. OK, how is this? The C comment allows me to add 'or'. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. + --Y5rl02BVI9TCfPar Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="ecpg2.diff" diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml new file mode 100644 index bf01857..6326439 *** a/doc/src/sgml/ecpg.sgml --- b/doc/src/sgml/ecpg.sgml *************** EXEC SQL END DECLARE SECTION; *** 199,205 **** ... EXEC SQL CONNECT TO :target USER :user USING :passwd; ! EXEC SQL CONNECT TO :target USER :user/:passwd; The last form makes use of the variant referred to above as character variable reference. You will see in later sections how C --- 199,205 ---- ... EXEC SQL CONNECT TO :target USER :user USING :passwd; ! /* or EXEC SQL CONNECT TO :target USER :user/:passwd; */ The last form makes use of the variant referred to above as character variable reference. You will see in later sections how C --Y5rl02BVI9TCfPar Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs --Y5rl02BVI9TCfPar-- From tgl@sss.pgh.pa.us Sun May 31 23:44:38 2026 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TyoDA-0006ro-8F for pgsql-docs@arkaria.postgresql.org; Fri, 25 Jan 2013 18:41:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TyoD9-0005Xw-3S for pgsql-docs@arkaria.postgresql.org; Fri, 25 Jan 2013 18:41:11 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TyoD8-0005Xq-1q for pgsql-docs@postgresql.org; Fri, 25 Jan 2013 18:41:10 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TyoD6-0005sF-Pg for pgsql-docs@postgresql.org; Fri, 25 Jan 2013 18:41:09 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r0PIf6LG016179; Fri, 25 Jan 2013 13:41:06 -0500 (EST) From: Tom Lane To: Bruce Momjian cc: Alan B , pgsql-docs@postgresql.org Subject: Re: Add clarification example to EXEC SQL CONNECT with password In-reply-to: <20130125181921.GD6848@momjian.us> References: <20130125161942.GA6848@momjian.us> <14376.1359134732@sss.pgh.pa.us> <20130125172959.GB6848@momjian.us> <14933.1359136212@sss.pgh.pa.us> <20130125181921.GD6848@momjian.us> Comments: In-reply-to Bruce Momjian message dated "Fri, 25 Jan 2013 13:19:21 -0500" Date: Fri, 25 Jan 2013 13:41:06 -0500 Message-ID: <16178.1359139266@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org Bruce Momjian writes: > On Fri, Jan 25, 2013 at 12:50:12PM -0500, Tom Lane wrote: >> (looks at the whole section) As-is, it's definitely not good, because >> before there were three independent examples, and now there are three >> and a half --- the added example depends on the variables declared in >> the third example. But using the blank line means you've formatted it >> as a stand-alone fourth example, which is not only wrong in itself but >> it screws up the meanings of both of the subsequent paragraphs. > OK, how is this? The C comment allows me to add 'or'. It's still completely failing to address the problem that it's formatted as a fourth, independent example. Please remove the blank line. regards, tom lane -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs From bruce@momjian.us Sun May 31 23:44:38 2026 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TyoFD-0006vb-0S for pgsql-docs@arkaria.postgresql.org; Fri, 25 Jan 2013 18:43:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TyoFB-0006pP-Uh for pgsql-docs@arkaria.postgresql.org; Fri, 25 Jan 2013 18:43:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TyoF2-0006hj-2j for pgsql-docs@postgresql.org; Fri, 25 Jan 2013 18:43:08 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TyoEx-0004I1-1B for pgsql-docs@postgresql.org; Fri, 25 Jan 2013 18:43:07 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1TyoEv-0005K5-MN; Fri, 25 Jan 2013 13:43:01 -0500 Date: Fri, 25 Jan 2013 13:43:01 -0500 From: Bruce Momjian To: Tom Lane Cc: Alan B , pgsql-docs@postgresql.org Subject: Re: Add clarification example to EXEC SQL CONNECT with password Message-ID: <20130125184301.GG6848@momjian.us> References: <20130125161942.GA6848@momjian.us> <14376.1359134732@sss.pgh.pa.us> <20130125172959.GB6848@momjian.us> <14933.1359136212@sss.pgh.pa.us> <20130125181921.GD6848@momjian.us> <16178.1359139266@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="48TaNjbzBVislYPb" Content-Disposition: inline In-Reply-To: <16178.1359139266@sss.pgh.pa.us> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org --48TaNjbzBVislYPb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jan 25, 2013 at 01:41:06PM -0500, Tom Lane wrote: > Bruce Momjian writes: > > On Fri, Jan 25, 2013 at 12:50:12PM -0500, Tom Lane wrote: > >> (looks at the whole section) As-is, it's definitely not good, because > >> before there were three independent examples, and now there are three > >> and a half --- the added example depends on the variables declared in > >> the third example. But using the blank line means you've formatted it > >> as a stand-alone fourth example, which is not only wrong in itself but > >> it screws up the meanings of both of the subsequent paragraphs. > > > OK, how is this? The C comment allows me to add 'or'. > > It's still completely failing to address the problem that it's formatted > as a fourth, independent example. Please remove the blank line. How is this? -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. + --48TaNjbzBVislYPb Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="ecpg3.diff" diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml new file mode 100644 index bf01857..4d904cd *** a/doc/src/sgml/ecpg.sgml --- b/doc/src/sgml/ecpg.sgml *************** const char *passwd = "secret"; *** 198,205 **** EXEC SQL END DECLARE SECTION; ... EXEC SQL CONNECT TO :target USER :user USING :passwd; ! ! EXEC SQL CONNECT TO :target USER :user/:passwd; The last form makes use of the variant referred to above as character variable reference. You will see in later sections how C --- 198,204 ---- EXEC SQL END DECLARE SECTION; ... EXEC SQL CONNECT TO :target USER :user USING :passwd; ! /* or EXEC SQL CONNECT TO :target USER :user/:passwd; */ The last form makes use of the variant referred to above as character variable reference. You will see in later sections how C --48TaNjbzBVislYPb Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs --48TaNjbzBVislYPb-- From tgl@sss.pgh.pa.us Sun May 31 23:44:38 2026 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TyoG6-0006xS-J8 for pgsql-docs@arkaria.postgresql.org; Fri, 25 Jan 2013 18:44:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TyoG5-0007bT-GP for pgsql-docs@arkaria.postgresql.org; Fri, 25 Jan 2013 18:44:13 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TyoFu-0007Rv-M3 for pgsql-docs@postgresql.org; Fri, 25 Jan 2013 18:44:02 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TyoFt-0005tE-FQ for pgsql-docs@postgresql.org; Fri, 25 Jan 2013 18:44:01 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r0PIhxBe016286; Fri, 25 Jan 2013 13:43:59 -0500 (EST) From: Tom Lane To: Bruce Momjian cc: Alan B , pgsql-docs@postgresql.org Subject: Re: Add clarification example to EXEC SQL CONNECT with password In-reply-to: <20130125184301.GG6848@momjian.us> References: <20130125161942.GA6848@momjian.us> <14376.1359134732@sss.pgh.pa.us> <20130125172959.GB6848@momjian.us> <14933.1359136212@sss.pgh.pa.us> <20130125181921.GD6848@momjian.us> <16178.1359139266@sss.pgh.pa.us> <20130125184301.GG6848@momjian.us> Comments: In-reply-to Bruce Momjian message dated "Fri, 25 Jan 2013 13:43:01 -0500" Date: Fri, 25 Jan 2013 13:43:59 -0500 Message-ID: <16285.1359139439@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org Bruce Momjian writes: > On Fri, Jan 25, 2013 at 01:41:06PM -0500, Tom Lane wrote: >> It's still completely failing to address the problem that it's formatted >> as a fourth, independent example. Please remove the blank line. > How is this? Yeah, that seems to work --- it looks like a single example now. regards, tom lane -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs From bruce@momjian.us Sun May 31 23:44:38 2026 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TyoKX-0007C6-Iu for pgsql-docs@arkaria.postgresql.org; Fri, 25 Jan 2013 18:48:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TyoKW-00030a-TE for pgsql-docs@arkaria.postgresql.org; Fri, 25 Jan 2013 18:48:48 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TyoId-0001OF-7s for pgsql-docs@postgresql.org; Fri, 25 Jan 2013 18:46:51 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TyoIa-0004NX-6H for pgsql-docs@postgresql.org; Fri, 25 Jan 2013 18:46:50 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1TyoIZ-0006id-4M; Fri, 25 Jan 2013 13:46:47 -0500 Date: Fri, 25 Jan 2013 13:46:47 -0500 From: Bruce Momjian To: Tom Lane Cc: Alan B , pgsql-docs@postgresql.org Subject: Re: Add clarification example to EXEC SQL CONNECT with password Message-ID: <20130125184647.GI6848@momjian.us> References: <20130125161942.GA6848@momjian.us> <14376.1359134732@sss.pgh.pa.us> <20130125172959.GB6848@momjian.us> <14933.1359136212@sss.pgh.pa.us> <20130125181921.GD6848@momjian.us> <16178.1359139266@sss.pgh.pa.us> <20130125184301.GG6848@momjian.us> <16285.1359139439@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16285.1359139439@sss.pgh.pa.us> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org On Fri, Jan 25, 2013 at 01:43:59PM -0500, Tom Lane wrote: > Bruce Momjian writes: > > On Fri, Jan 25, 2013 at 01:41:06PM -0500, Tom Lane wrote: > >> It's still completely failing to address the problem that it's formatted > >> as a fourth, independent example. Please remove the blank line. > > > How is this? > > Yeah, that seems to work --- it looks like a single example now. Thanks, done. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. + -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs From alan77codebits@gmail.com Sun May 31 23:44:38 2026 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W5DNV-0001g4-6l for pgsql-docs@arkaria.postgresql.org; Mon, 20 Jan 2014 11:50:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W5DNU-0001cX-NN for pgsql-docs@arkaria.postgresql.org; Mon, 20 Jan 2014 11:50:52 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W5DNT-0001cR-Sc for pgsql-docs@postgresql.org; Mon, 20 Jan 2014 11:50:52 +0000 Received: from mail-we0-x235.google.com ([2a00:1450:400c:c03::235]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W5DNQ-0004w9-IR for pgsql-docs@postgresql.org; Mon, 20 Jan 2014 11:50:51 +0000 Received: by mail-we0-f181.google.com with SMTP id u56so6728256wes.40 for ; Mon, 20 Jan 2014 03:50:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=pHxwdVGdTPttOfu8OeNwqR6hqYOjtgx6WHTVfAPOslU=; b=kj47vANZnPHd4DoZd+Aki+SYzdkSh9DDTFrmEDMeTyrXnXbOOsCF5Uio/O4nOZvwL5 ys2nAxNgYK70OMqfg0BjN3suyeXcWZLC1ZRQRjb29xYxgyOaN4n0ICmt2c8XjvQLQRYS JLEQ+JhP22IL+Dq3YyaQjexYJ0zQZUxDJIjeSZfJfNueAC/L3oHngrW0O5oUuiinYJQh efdp5r3nqCEY5XIGnPY5ZzJ26EDbGbWBzAmcwYuuGQ8HF+kkYk9q7UYCunaSXOuYbxfY zEVbC8e0A9crF0AyoXdqM+COKbysnlNAiScrN3scTUlGy9+OQyeND0BwoboKpy0jzsxD qghA== MIME-Version: 1.0 X-Received: by 10.180.189.106 with SMTP id gh10mr9680910wic.18.1390218647187; Mon, 20 Jan 2014 03:50:47 -0800 (PST) Received: by 10.180.105.42 with HTTP; Mon, 20 Jan 2014 03:50:47 -0800 (PST) In-Reply-To: <20130125184647.GI6848@momjian.us> References: <20130125161942.GA6848@momjian.us> <14376.1359134732@sss.pgh.pa.us> <20130125172959.GB6848@momjian.us> <14933.1359136212@sss.pgh.pa.us> <20130125181921.GD6848@momjian.us> <16178.1359139266@sss.pgh.pa.us> <20130125184301.GG6848@momjian.us> <16285.1359139439@sss.pgh.pa.us> <20130125184647.GI6848@momjian.us> Date: Mon, 20 Jan 2014 12:50:47 +0100 Message-ID: Subject: Re: Add clarification example to EXEC SQL CONNECT with password From: Alan B To: Bruce Momjian Cc: Tom Lane , pgsql-docs@postgresql.org Content-Type: multipart/alternative; boundary=001a11c34aeaa037fa04f0658059 X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org --001a11c34aeaa037fa04f0658059 Content-Type: text/plain; charset=ISO-8859-1 Hi Bruce, Tom, Great to see this addressed, thanks. Alan On Fri, Jan 25, 2013 at 7:46 PM, Bruce Momjian wrote: > On Fri, Jan 25, 2013 at 01:43:59PM -0500, Tom Lane wrote: > > Bruce Momjian writes: > > > On Fri, Jan 25, 2013 at 01:41:06PM -0500, Tom Lane wrote: > > >> It's still completely failing to address the problem that it's > formatted > > >> as a fourth, independent example. Please remove the blank line. > > > > > How is this? > > > > Yeah, that seems to work --- it looks like a single example now. > > Thanks, done. > > -- > Bruce Momjian http://momjian.us > EnterpriseDB http://enterprisedb.com > > + It's impossible for everything to be true. + > --001a11c34aeaa037fa04f0658059 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Bruce, Tom,
Great to see this addressed= , thanks.

Alan



On Fri, Jan 25, 2013 at= 7:46 PM, Bruce Momjian <bruce@momjian.us> wrote:
On F= ri, Jan 25, 2013 at 01:43:59PM -0500, Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us= > writes:
> > On Fri, Jan 25, 2013 at 01:41:06PM -0500, Tom Lane wrote:
> >> It's still completely failing to address the problem that= it's formatted
> >> as a fourth, independent example. =A0Please remove the blank = line.
>
> > How is this?
>
> Yeah, that seems to work --- it looks like a single example now.

Thanks, done.

--
=A0 Bruce Momjian =A0<bruce@momjian.= us> =A0 =A0 =A0 =A0h= ttp://momjian.us
=A0 EnterpriseDB =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 http://enterprisedb.com=

=A0 + It's impossible for everything to be true. +

--001a11c34aeaa037fa04f0658059--