From: Bruce Momjian <bruce@momjian.us>
To: Guillaume Lelarge <guillaume@lelarge.info>
Cc: Neil Conway <neilc@samurai.com>
Cc: pgsql-docs@postgresql.org
Subject: Re: Two fixes for plpgsql.sgml
Date: Wed, 28 Nov 2007 15:15:57 -0500 (EST)
Message-ID: <200711282015.lASKFve27538@momjian.us> (raw)
In-Reply-To: <474D3962.2070709@lelarge.info>
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 ****
> >
> > <para>
> > <application>PL/pgSQL</> functions can also be declared to return
> > ! a <quote>set</>, or table, of any data type they can return a
> > single
> > instance of. Such a function generates its output by executing
> > <command>RETURN NEXT</> for each desired element of the result
> > set, or by using <command>RETURN QUERY</> to output the result of
> > --- 133,139 ----
> >
> > <para>
> > <application>PL/pgSQL</> functions can also be declared to return
> > ! a <quote>set</>, or table, or any data type they can return a
> > single
> > instance of. Such a function generates its output by executing
> > <command>RETURN NEXT</> for each desired element of the result
> > set, or by using <command>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 <bruce@momjian.us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Attachments:/rtmp/diff (text/x-diff, 1.5K) download
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 ****
<para>
<application>PL/pgSQL</> functions can also be declared to return
! a <quote>set</>, or table, of any data type they can return a single
! instance of. Such a function generates its output by executing
! <command>RETURN NEXT</> for each desired element of the result
set, or by using <command>RETURN QUERY</> to output the result of
evaluating a query.
</para>
--- 133,140 ----
<para>
<application>PL/pgSQL</> functions can also be declared to return
! a <quote>set</>, or table. Such a function generates its output by
! executing <command>RETURN NEXT</> for each desired element of the result
set, or by using <command>RETURN QUERY</> to output the result of
evaluating a query.
</para>
***************
*** 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: bruce@momjian.us, guillaume@lelarge.info, neilc@samurai.com
Subject: Re: Two fixes for plpgsql.sgml
In-Reply-To: <200711282015.lASKFve27538@momjian.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox