Disable wrapping in Psql output

后端 未结 5 1454
猫巷女王i
猫巷女王i 2021-02-06 21:43

When using Psql in Linux, if the result of my SQL query contains many columns or long strings of data, it will wrap the initial view and only once I scroll to the side will it s

5条回答
  •  别跟我提以往
    2021-02-06 22:20

    The default pager for psql is less. Then for no wrapped lines must be use less -S. PAGER="less -S" psql is a good aproach. But inside psql you can use

    \setenv PAGER 'less -S'
    

提交回复
热议问题