VastbaseE100

基于开源技术的HTAP数据库管理系统。性能优异,稳定可靠,提供诸多专属领域特性。

Menu

支持OPEN-FOR-USING语句

CREATE OR REPLACE PROCEDURE testatlasdb() AS $$  
DECLARE  
  cur_vv refcursor; 
  v_id int;
BEGIN  
   open cur_vv for 'select id  from at_tb2 where id=:a' using 1;
   loop
       fetch cur_vv into v_id;
	   exit when cur_vv%NOTFOUND;
   raise notice '%', v_id;
   end loop; 
   close cur_vv;
     return;
END;  
$$ LANGUAGE plpgsql;