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

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: plpgsql doesn't check a number of expressions and number of target variables correctly
Дата
Msg-id CAFj8pRDGjHYVdZbadEMWDxPCih12yF=P13DVHUbbzrjnLYfpmQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: plpgsql doesn't check a number of expressions and number of target variables correctly  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
2012/3/5 Tom Lane <tgl@sss.pgh.pa.us>:
> 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
>> =C2=A0 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.

I agree with you about break working application :( But this is good
example what should be checked in CHECK statement.

but it should be bug - it has no sense - no in this form - it is
assign row to scalar.

I found a some mysterious and very difficult identified bugs in one
application based on this behave.

Regards

Pavel

>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: plpgsql doesn't check a number of expressions and number of target variables correctly
Следующее
От: Euler Taveira de Oliveira
Дата:
Сообщение: Re: BUG #6519: Server doesn't listem