Disabling the Pager in psql for the postgres User

Great! It looks like you successfully created the .psqlrc file in the postgres user's home directory (/var/lib/postgresql/) and confirmed that the pager is now disabled when running psql as the postgres user. The message "Pager usage is off" confirms that the configuration is working as expected.

Summary of What You Did

  1. Switched to the postgres user:

    sudo -i -u postgres
    
  2. Created the .psqlrc file in the postgres user's home directory and added the line:

    \pset pager off
    
  3. Verified the configuration by running psql and confirming that the pager is disabled.

This is a good solution for ensuring that psql doesn't use a pager when run by the postgres user, which can be helpful for scripting or automated tasks where interactive paging is undesirable.


Written by A.M. Rinas