如何在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时显示每个循环的结果。在
谢谢你
尝试使用“通知”
打印(连接通知)在
http://initd.org/psycopg/docs/connection.html?highlight=notice#connection.notices
相关问题 更多 >
编程相关推荐