Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 552982E2E99 for ; Wed, 28 Nov 2007 17:40:50 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 18476-04 for ; Wed, 28 Nov 2007 17:40:44 -0400 (AST) Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by postgresql.org (Postfix) with ESMTP id 2961F2E01B0 for ; Wed, 28 Nov 2007 17:40:46 -0400 (AST) Received: from perhan.alvh.no-ip.org (200-126-98-252.bk7-dsl.surnet.cl [200.126.98.252]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id lASLeY2E020298 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 28 Nov 2007 13:40:36 -0800 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 4C6B347C0F; Wed, 28 Nov 2007 18:40:36 -0300 (CLST) Date: Wed, 28 Nov 2007 18:40:36 -0300 From: Alvaro Herrera To: Bruce Momjian Cc: Tom Lane , Guillaume Lelarge , Neil Conway , pgsql-docs@postgresql.org Subject: Re: Two fixes for plpgsql.sgml Message-ID: <20071128214036.GW5118@alvh.no-ip.org> References: <20923.1196282281@sss.pgh.pa.us> <200711282057.lASKvSt19769@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200711282057.lASKvSt19769@momjian.us> User-Agent: Mutt/1.5.16 (2007-06-11) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Wed, 28 Nov 2007 13:40:37 -0800 (PST) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/112 X-Sequence-Number: 4645 Bruce Momjian wrote: > --- 132,142 ---- > > > > ! PL/pgSQL functions can also be declared to return a > ! group of values, either as a single row, or a group of rows, like a > ! 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. > Hmm, ISTM the correct terminology is "set of rows". I have never heard of "a group of rows". It seems to me the easiest way out of the problem would have been substituting the commas in the original with parens: PL/pgSQL functions can also be declared to return a set (or table) of any data type they can return a single instance of. The point of "any datatype they can return a single instance of" is that this can be a set of scalar values (e.g. "RETURNS SETOF int") or of a complex type ("RETURNS SETOF table"), or anything else they can return a single instance of :-P (SETOF anyelement? SETOF table%TYPE?) -- Alvaro Herrera http://www.PlanetPostgreSQL.org/ "World domination is proceeding according to plan" (Andrew Morton)