Re: PL/pgSQL: SELECT INTO EXACT - Mailing list pgsql-patches

From Tom Lane
Subject Re: PL/pgSQL: SELECT INTO EXACT
Date
Msg-id 9332.1123535933@sss.pgh.pa.us
Whole thread Raw
In response to Re: PL/pgSQL: SELECT INTO EXACT  (Matt Miller <mattm@epx.com>)
Responses Re: PL/pgSQL: SELECT INTO EXACT  (Matt Miller <mattm@epx.com>)
Re: PL/pgSQL: #option select_into_1_row (was SELECT INTO  (Matt Miller <mattm@epx.com>)
List pgsql-patches
Matt Miller <mattm@epx.com> writes:
> On Fri, 2005-07-29 at 17:52 -0400, Tom Lane wrote:
>> 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 can attach a patch that supports [EXACT | NOEXACT].

Somehow, proposing two new reserved words instead of one doesn't seem
very responsive to my gripe :-(.

If you think that this should be a global option instead of a
per-statement one, something like the (undocumented) #option hack might
be a good way to specify it; that would give it per-function scope,
which seems reasonable.

    create function myfn(...) returns ... as $$
        #option select_into_1_row
        declare ...
    $$ language plpgsql;

            regards, tom lane

pgsql-patches by date:

Previous
From: Matt Miller
Date:
Subject: Re: PL/pgSQL: SELECT INTO EXACT
Next
From: Matt Miller
Date:
Subject: Re: PL/pgSQL: SELECT INTO EXACT