Re: plpgsql doesn't check a number of expressions and number of target variables correctly - Mailing list pgsql-bugs

From Tom Lane
Subject Re: plpgsql doesn't check a number of expressions and number of target variables correctly
Date
Msg-id 24904.1330976177@sss.pgh.pa.us
Whole thread Raw
In response to plpgsql doesn't check a number of expressions and number of target variables correctly  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: plpgsql doesn't check a number of expressions and number of target variables correctly  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-bugs
Pavel Stehule <pavel.stehule@gmail.com> writes:
> Hello
> I found a plpgsql bug:

> create or replace function fx()
> returns void as $$
> declare a int; b int;
> begin
>   select 10,20 into a;
> end;
> $$ language plpgsql;

> this is bug, or minimally potential source of strange behave.

AFAICS this is intentional --- see the comment in exec_move_row.

In any case, I think tightening it up is more likely to break working
applications than do anything helpful.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: BUG #6518: archive_command stderr not in log if log_destination=syslog
Next
From: Pavel Stehule
Date:
Subject: Re: plpgsql doesn't check a number of expressions and number of target variables correctly