BUG #6583: for loop cursor
От | biju.george@ust-global.com |
---|---|
Тема | BUG #6583: for loop cursor |
Дата | |
Msg-id | E1SIFo4-00025a-H3@wrigleys.postgresql.org обсуждение исходный текст |
Ответы |
Re: BUG #6583: for loop cursor
|
Список | pgsql-bugs |
The following bug has been logged on the website: Bug reference: 6583 Logged by: Biju George Email address: biju.george@ust-global.com PostgreSQL version: 8.4.0 Operating system: Linux Description:=20=20=20=20=20=20=20=20 Just this simple code throws below error -- CREATE OR REPLACE FUNCTION my_temp_func(v_acc_type integer) RETURNS void AS $BODY$ declare v_cur cursor (acc_num integer) is select pid from public.my_trade_table where acc_type =3D acc_num; begin for record_var in v_cur(v_acc_type) loop raise notice 'ID is %',record_var.id; end loop; end; $BODY$ LANGUAGE plpgsql; ------------Error--------------- ERROR: syntax error at or near "$1" LINE 1: $1 ( $2 ) ^ QUERY: $1 ( $2 ) CONTEXT: SQL statement in PL/PgSQL function "my_temp_func" near line 4 ********** Error ********** ERROR: syntax error at or near "$1" SQL state: 42601 Context: SQL statement in PL/PgSQL function "my_temp_func" near line 4
В списке pgsql-bugs по дате отправления: