0

I'm a windows user and trying to connect my db in Heroku.

so after entering heroku pg:psql, I had the access to my database.

I created a table without any errors. So now I want to check my table data.

But after running

kqhwudhkquwd=> select * from users;
'more' is not recognized as an internal or external command

I get this error. It seems the SELECT command doesnt work. Pls help thanks

thox
  • 129
  • 4
  • 13

1 Answers1

6

more is unix pager - it is used, when the result cannot be printed on one screen. If it is not available, then your PATH configuration is not correct. There are two solution:

  • fix your system configuration - Right Click on) My Computer -> Properties -> Advanced tab -> Environment Variable -> set the PATH in system variables. Add these to the PATH variable : %SystemRoot%;%SystemRoot%\system32;%PROGRAMFILES%\PostgreSQL\9.x\bin Based on mailing list reply.

  • disable pager

    \pset pager off
    select * from users;
    
Pavel Stehule
  • 42,331
  • 5
  • 91
  • 94
  • Hmm, on my Windows 10 computer, `where more` returns `C:\Windows\System32\more.com` so `more` is available in Windows by default. –  Feb 23 '18 at 08:20
  • @a_horse_with_no_name you have true, so the error message is strange - but the workaround is same - disable pager. I found this issue in mailing list - so I fixed my reply. – Pavel Stehule Feb 23 '18 at 13:32
  • 1
    I'm new to PostgreSQL so I don't know the implications of this but disabling pager fixed this same error for me. Thank you! – Matthew Wolman May 12 '21 at 23:46