Search Postgresql Archives

Re: 8.3.5 problem with plpgsql selecting into an array variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



raf <raf@xxxxxxx> 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux