From: | Marko Tiikkaja <marko(at)joh(dot)to> |
---|---|
To: | Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com> |
Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: plpgsql - additional extra checks |
Date: | 2017-01-13 11:55:58 |
Message-ID: | CAL9smLBJQC_c_dfcJ9KMz=gHPQ7BCN0VpSBqdsgfkWF983-B4Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jan 13, 2017 at 2:46 AM, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com> wrote:
> On 1/11/17 5:54 AM, Pavel Stehule wrote:
>
>> + <term><varname>too_many_rows</varname></term>
>> + <listitem>
>> + <para>
>> + When result is assigned to a variable by <literal>INTO</literal>
>> clause,
>> + checks if query returns more than one row. In this case the
>> assignment
>> + is not deterministic usually - and it can be signal some issues in
>> design.
>>
>
> Shouldn't this also apply to
>
> var := blah FROM some_table WHERE ...;
>
> ?
>
> AIUI that's one of the beefs the plpgsql2 project has.
>
No, not at all. That syntax is undocumented and only works because
PL/PgSQL is a hack internally. We don't use it, and frankly I don't think
anyone should.
.m
From | Date | Subject | |
---|---|---|---|
Next Message | Dilip Kumar | 2017-01-13 13:06:16 | Re: Parallel bitmap heap scan |
Previous Message | Amit Khandekar | 2017-01-13 11:38:05 | Too many autovacuum workers spawned during forced auto-vacuum |