如何从PL/pgSQL写入磁盘上的文件? [英] How can I write to a file on disk from PL/pgSQL?
本文介绍了如何从PL/pgSQL写入磁盘上的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想做相当于c或php的fopen()和fwrite().我不是试图将表转储到磁盘.我正在尝试在开发过程中进行一些调试日志记录.
I would like to do the equivalent of c or php fopen() and fwrite(). I am not trying to dump a table to disk. I am trying to do some debug logging during development.
推荐答案
您可以 提高 NOTICE
或DEBUG
消息,它们位于plpgsql函数或
You can RAISE NOTICE
or DEBUG
messages in a plpgsql function or a DO
statement which are written to the DB log file.
这篇关于如何从PL/pgSQL写入磁盘上的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文