将Postgres \i输入的输出放入文件? [英] Putting output from Postgres \i input to a file?
本文介绍了将Postgres \i输入的输出放入文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
快速提问(我希望!):如果我使用\i将输入文件输入到psql中,是否可以将查询的输出保存到文件中?如果是这样,怎么办?谢谢!!!!
Quick question (I hope!): if I use \i to feed an input file into psql, can I get the output from the queries to be saved into a file? If so, how? Thanks!!
推荐答案
基于文档, \o
用于将输出定向到文件。
Based on the documentation, the \o
is for directing output to a file.
这篇关于将Postgres \i输入的输出放入文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文