Skip site navigation (1) Skip section navigation (2)

BUG #14463: refcursor cann't used with array or variadic parameter?

From: digoal(at)126(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #14463: refcursor cann't used with array or variadic parameter?
Date: 2016-12-13 15:25:48
Message-ID: 20161213152548.14897.81245@wrigleys.postgresql.org (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-bugs
The following bug has been logged on the website:

Bug reference:      14463
Logged by:          Zhou Digoal
Email address:      digoal(at)126(dot)com
PostgreSQL version: 9.6.1
Operating system:   CentOS 6.x x64
Description:        

postgres=# CREATE FUNCTION myfunc(variadic ref refcursor[]) RETURNS SETOF
refcursor AS $$                                               
begin   
 open ref[1] for select * from pg_class; 
 return next ref[1];       
 open ref[2] for select * from pg_class;
 return next ref[2];  
end;                               
$$ lANGUAGE plpgsql;
ERROR:  42804: variable "$1" must be of type cursor or refcursor
LINE 3:  open ref[1] for select * from pg_class;
              ^
LOCATION:  plpgsql_yyparse, pl_gram.y:2187
Time: 0.854 ms


Responses

pgsql-bugs by date

Next:From: Pavel StehuleDate: 2016-12-13 16:16:43
Subject: Re: BUG #14463: refcursor cann't used with array or variadic parameter?
Previous:From: Michael PaquierDate: 2016-12-13 13:52:50
Subject: Re: BUG #14462: Segment Fault recovery mode

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group