PostgreNotHyprint存储过程

2024-09-30 06:12:14 发布

您现在位置:Python中文网/ 问答频道 /正文

如何在python脚本上打印postgres的存储过程?在

postgres中的存储过程示例如下:

create or replace function checktime() returns void
language plpgsql
as $$
DECLARE timestart TIMESTAMP;

  FOR id from rt LOOP
    SELECT timeofday() into timestart;
    RAISE NOTICE 'Time now : %', timestart;
  END LOOP;

END;
$$
;

在python中,我的脚本是:

^{pr2}$

我希望在运行python时显示每个循环的结果。在

谢谢你


Tags: or脚本loop示例过程createfunctionpostgres

热门问题