lightdb for postgresql PL/pgSQL perform、execute、call区别

postgres=# \timing on
Timing is on.
postgres=# DO $$                     
DECLARE i int;
BEGIN
FOR i IN 1..1000000 LOOP 
execute 'select nextval(''idx_seq'')';
END LOOP;
END$$;
DO
Time: 6321.316 ms (00:06.321)

 

perform no_return_value_func();

execute sql_stmt into xxx;

execute select has_return_value_func() into my_var;

call proc();

https://stackoverflow.com/questions/42920998/pl-pgsql-perform-vs-execute

https://blog.csdn.net/msdnchina/article/details/60773912

posted @ 2021-11-09 16:39  zhjh256  阅读(556)  评论(0编辑  收藏  举报