Alternate output format for psql

前端 未结 7 1846
迷失自我
迷失自我 2020-12-04 04:44

I am using PostgreSQL 8.4 on Ubuntu. I have a table with columns c1 through cN. The columns are wide enough that selecting all columns causes a row

7条回答
  •  北海茫月
    2020-12-04 05:17

    One interesting thing is we can view the tables horizontally, without folding. we can use PAGER environment variable. psql makes use of it. you can set

    export PAGER='/usr/bin/less -S'
    

    or just less -S if its already availble in command line, if not with the proper location. -S to view unfolded lines. you can pass in any custom viewer or other options with it.

    I've written more in Psql Horizontal Display

提交回复
热议问题