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