Re: plpgsql doesn't check a number of expressions and number of target variables correctly

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: plpgsql doesn't check a number of expressions and number of target variables correctly
Date: 2012-03-05 19:36:17
Message-ID: 24904.1330976177@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Pavel Stehule <pavel(dot)stehule(at)gmail(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Pavel Stehule 2012-03-05 20:08:12 Re: plpgsql doesn't check a number of expressions and number of target variables correctly
Previous Message Alvaro Herrera 2012-03-05 19:16:29 Re: BUG #6518: archive_command stderr not in log if log_destination=syslog