VastbaseG100

基于openGauss内核开发的企业级关系型数据库。

Menu

支持pipe row语法

vastbase=# CREATE OR REPLACE FUNCTION test()
vastbase-#  RETURN int 
vastbase-#  PIPELINED 
vastbase-# AS 
vastbase$#  DECLARE
vastbase$#   result RECORD;
vastbase$#   row RECORD;
vastbase$#  BEGIN
vastbase$#   pipe row(1);
vastbase$#   pipe row(2);
vastbase$#   return;
vastbase$#  END;
vastbase$#  /
CREATE FUNCTION
vastbase=# select * from table(test());
 test 
------
    1
    2
(2 rows)