Re: plpgsql EXECUTE will not set FOUND

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: David Fetter <david(at)fetter(dot)org>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Dimitri Fontaine <dfontaine(at)hi-media(dot)com>, PGDG <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: plpgsql EXECUTE will not set FOUND
Date: 2009-11-10 14:23:16
Message-ID: 200911101423.nAAENGb26757@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David Fetter wrote:
> On Mon, Nov 09, 2009 at 09:01:14PM -0500, Bruce Momjian wrote:
> >
> > I have applied the attached patch to document that FOUND is not affected
> > by EXECUTE, while GET DIAGNOSTICS is.
>
> One minor nit here:
>
> > Index: doc/src/sgml/plpgsql.sgml
> > ===================================================================
> > RCS file: /cvsroot/pgsql/doc/src/sgml/plpgsql.sgml,v
> > retrieving revision 1.143
> > diff -c -c -r1.143 plpgsql.sgml
> > *** doc/src/sgml/plpgsql.sgml 29 Sep 2009 20:05:29 -0000 1.143
> > --- doc/src/sgml/plpgsql.sgml 10 Nov 2009 01:55:33 -0000
> > ***************
> > *** 1366,1372 ****
> >
> > <literal>FOUND</literal> is a local variable within each
> > <application>PL/pgSQL</application> function; any changes to it
> > ! affect only the current function.
> > </para>
> >
> > </sect2>
> > --- 1366,1374 ----
> >
> > <literal>FOUND</literal> is a local variable within each
> > <application>PL/pgSQL</application> function; any changes to it
> > ! affect only the current function. <literal>FOUND</literal> is not
> > ! affected by <literal>EXECUTE</literal>, while <command>GET
> > ! DIAGNOSTICS</command> is effected.
>
> The passive form of this phrase would be "is affected," instead of "is
> effected," or (my preference) change to an active construction like:
>
> <literal>EXECUTE</literal> changes the output of <command>GET
> DIAGNOSTICS</command>, but does not change the state of
> <literal>FOUND</literal>.

Thank you so much. I was struggling with the phrasing myself. Updated.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-11-10 14:38:59 Re: Query::targetList and RETURNING
Previous Message Bruce Momjian 2009-11-10 14:19:50 Re: Parsing config files in a directory