On Fri, 2005-07-29 at 17:52 -0400, Tom Lane wrote:
> Matt Miller <mattm@epx.com> writes:
> > This patch implements an optional EXACT keyword after the INTO keyword
> > of the PL/pgSQL SELECT INTO command. ... when SELECTing INTO ...
> > leave the targets untouched if the query does not
> > return exactly one row.
>
> I dislike the choice of "EXACT", too, as it (a) adds a new reserved word
> and (b) doesn't seem to convey quite what is happening anyway. Not sure
> about a better word though ... anyone?
I don't know how to avoid adding a keyword, unless the proposed EXACT
behavior just replaces the current behavior, potentially breaking
existing code. Is there a precedent for language-specific GUC vars?
I think the EXACT behavior is more reasonable overall, and maybe a
stepped approach can replace the current behavior with the EXACT flavor.
To that end the option could support either EXACT or NOEXACT, with
NOEXACT initially being the default. Eventually EXACT could become the
default, and finally the NOEXACT option could be dropped altogether. At
that point the EXACT keyword would be dropped as well.
I can attach a patch that supports [EXACT | NOEXACT].