Re: [GENERAL] 8.3.5 problem with plpgsql selecting into an array variable

2009-04-05 Thread raf
Tom Lane wrote: > raf 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]), > >

Re: [GENERAL] 8.3.5 problem with plpgsql selecting into an array variable

2009-04-05 Thread Tom Lane
raf 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]) >

[GENERAL] 8.3.5 problem with plpgsql selecting into an array variable

2009-04-05 Thread raf
hi, postgresql-8.3.5 i'm seeing the following unexpected syntax error trying to select into a local array variable element. it seems that this: select sum(expr[1]), sum(expr[2]) into var[1], var[2] from... is being turned into this: select sum(expr[1]), sum(expr[2])[1], $1[2] from... ins