How to set default display mode in psql

后端 未结 4 798
长发绾君心
长发绾君心 2021-02-05 04:27

Almost every psql query comes out an illegible mess if not preceded by display configuration commands such as \\x auto. Typing this manually for each psql instance

4条回答
  •  礼貌的吻别
    2021-02-05 04:34

    There is an option of -x but it does not do the job for me as I am using COPY to send output to a file. Without copy "-x" works well!

    So here is what I have done to read:

    # psql -U postgres -o /tmp/output_file_name.txt <

    One can morph the above to whatever he/she needs to do. One can also do the same with an input file.

提交回复
热议问题