Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id E977F2E36C0 for ; Wed, 28 Nov 2007 16:16:02 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 69302-04-2 for ; Wed, 28 Nov 2007 16:15:59 -0400 (AST) Received: from momjian.us (momjian.us [70.90.9.53]) by postgresql.org (Postfix) with ESMTP id 30B822E36E1 for ; Wed, 28 Nov 2007 16:15:58 -0400 (AST) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id lASKFve27538; Wed, 28 Nov 2007 15:15:57 -0500 (EST) From: Bruce Momjian Message-Id: <200711282015.lASKFve27538@momjian.us> Subject: Re: Two fixes for plpgsql.sgml In-Reply-To: <474D3962.2070709@lelarge.info> To: Guillaume Lelarge Date: Wed, 28 Nov 2007 15:15:57 -0500 (EST) CC: Neil Conway , pgsql-docs@postgresql.org X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ELM1196280957-12213-3_" Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/102 X-Sequence-Number: 4635 --ELM1196280957-12213-3_ Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" Guillaume Lelarge wrote: > Neil Conway a ?crit : > > On Wed, 2007-11-28 at 08:17 +0100, Guillaume Lelarge wrote: > >> This patch fixes two issues on plpgsql.sgml. > > > > The first hunk seems like a regression to me: AFAICS the current > > phrasing is what is intended. > > > > *** 133,139 **** > > > > > > PL/pgSQL functions can also be declared to return > > ! a set, or table, of any data type they can return a > > single > > instance of. Such a function generates its output by executing > > RETURN NEXT for each desired element of the result > > set, or by using RETURN QUERY to output the result of > > --- 133,139 ---- > > > > > > PL/pgSQL functions can also be declared to return > > ! a set, or table, or any data type they can return a > > single > > instance of. Such a function generates its output by executing > > RETURN NEXT for each desired element of the result > > set, or by using RETURN QUERY to output the result of > > > > That's why I said that it needs to be reviewed carefully :) It just > means I didn't understand the sentence. Can you explain why the last > part is needed ? (the part that starts with "of any data type...") Agreed. I couldn't find any value to that phrase and couldn't find better wording, so I removed it. Patch attached and applied. -- Bruce Momjian http://momjian.us EnterpriseDB http://postgres.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + --ELM1196280957-12213-3_ Content-Transfer-Encoding: 7bit Content-Type: text/x-diff Content-Disposition: inline; filename="/rtmp/diff" Index: doc/src/sgml/plpgsql.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/plpgsql.sgml,v retrieving revision 1.118 diff -c -c -r1.118 plpgsql.sgml *** doc/src/sgml/plpgsql.sgml 28 Nov 2007 15:42:31 -0000 1.118 --- doc/src/sgml/plpgsql.sgml 28 Nov 2007 20:11:15 -0000 *************** *** 133,141 **** PL/pgSQL functions can also be declared to return ! a set, or table, of any data type they can return a single ! instance of. Such a function generates its output by executing ! RETURN NEXT for each desired element of the result set, or by using RETURN QUERY to output the result of evaluating a query. --- 133,140 ---- PL/pgSQL functions can also be declared to return ! a set, or table. Such a function generates its output by ! executing RETURN NEXT for each desired element of the result set, or by using RETURN QUERY to output the result of evaluating a query. *************** *** 1428,1434 **** WHERE fooid > 0 LOOP -- can do some processing here ! RETURN NEXT r; -- return next row of SELECT END LOOP; RETURN; END --- 1427,1433 ---- WHERE fooid > 0 LOOP -- can do some processing here ! RETURN NEXT r; -- return current row of SELECT END LOOP; RETURN; END --ELM1196280957-12213-3_--