Re: 8.3.5 problem with plpgsql selecting into an array variable

Поиск
Список
Период
Сортировка
От raf
Тема Re: 8.3.5 problem with plpgsql selecting into an array variable
Дата
Msg-id 20090406060635.GA1502@raf.org
обсуждение исходный текст
Ответ на Re: 8.3.5 problem with plpgsql selecting into an array variable  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Tom Lane wrote:

> raf <raf@raf.org> writes:
> > declare
> >         pay_group_rec pay_group;
> >         balance decimal(10,2)[];
> > begin
> >         select g.* into pay_group_rec from pay_group g where g.id = pay_group_id;
>
> >         select
> >                 sum(p.balance_period[1]),
> >                 sum(p.balance_period[2])
> >         into
> >                 balance[1],
> >                 balance[2]
> >         from
> >                 payee p
>
> Sorry, you can't do that ... per the fine manual, the INTO target can be
> "a record variable, a row variable, or a comma-separated list of simple
> variables and record/row fields".  Nothing there about array subscript
> expressions.
>
>             regards, tom lane

hi tom,

i had read the manual and the end of my original message
said what you've just said followed by a request for this
non-orthogonality in plpgsql to be fixed.

i'm just repeating myself in case you responded without
reading that part of the message (busy man that you are).

no doubt it's a low priority thing but not allowing array
elements here is hardly a desirable thing.

cheers,
raf


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 8.3.5 problem with plpgsql selecting into an array variable
Следующее
От: Henry
Дата:
Сообщение: Partitioned table and trigger/insert result horribleness