How can I write to a file on disk from PL/pgSQL?

前端 未结 3 1405
盖世英雄少女心
盖世英雄少女心 2021-01-25 08:37

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.

3条回答
  •  情话喂你
    2021-01-25 08:53

    You can RAISE NOTICE or DEBUG messages in a plpgsql function or a DO statement which are written to the DB log file.

提交回复
热议问题