I want to use less as my default pager. Therefore I have PAGER=less in my .bashrc. It's sourced properly:
$ echo $PAGER
less
However, psql still uses more if I call it with psql. BUT: If I call it with PAGER=less psql, psql does use less.
I have no idea why that is. Shouldn't the two calls be identical? man for example honors $PAGER. I know this because
MANPAGERis not setPAGER=more man moreworks as expectedPAGER='' man moredisables paging altogether (also as expected)
How do I get psql to recognize my pager setting?