customize pager in psql

后端 未结 2 1563
小鲜肉
小鲜肉 2020-12-14 15:56

When I use psql, the command line tool of PostgreSQL, in interactive mode, it lists data as paginated output.

However, because I use psql

2条回答
  •  被撕碎了的回忆
    2020-12-14 16:29

    For completeness we might mention that for a one-off or to use as a setting in one of your scripts... (and as mentioned by "mu", see the psql --help (manual))

    As a command in a script

    psql --pset=pager-off -c ""

    From your commandline

    psql --pset=pager=off

    This would be in effect for the single command only so it is most useful in a script.

    You can use this method in lieu of making temporary changes within the psql utility or permanent settings via the init file (~/.psqlrc).

提交回复
热议问题