0

I am following this PostGreSQL course:

https://www.youtube.com/watch?v=qw--VYLpxG4&t=665s

I have hit a wall when I try to use psql --help.

I have also tried connecting to my db.

It just does nothing and goes to next line.

I can create a database and drop it but I cannot connect to it or bring a table in the terminal.

It seems like psql is not working as it should. I have also set a path in the environment variables following this article: https://sqlbackupandftp.com/blog/setting-windows-path-for-postgres-tools

I have restarted my PC following the above but it does not work.

enter image description here

grozdeto
  • 1,201
  • 1
  • 13
  • 34
  • 4
    1) Please do post images, use copy and paste to post text 2) You have `postgres-# psql --help`. The `postgres-# ` indicates you are already in the `psql` program. If you want help in the program do either `help` or `\h`. 3) What you are running is a shell script that prompts for the `psql` connection parameters and then launches `psql`. – Adrian Klaver Mar 03 '22 at 16:33
  • 1
    Well, you are already started `psql` obviously `psql` is an internal `psql` command. If you want to see the help, use `help` as suggested by the welcome message. –  Mar 03 '22 at 17:49
  • Guys commands like pwd, cd do not work in psql. WHy is that? I will tell you it is not because of the semicolon that's for sure. I am also unable to read any files from path : \i 'C:/Users/grozdeto/Downloads/person.sql' -> that says column do not exist but they do. – grozdeto Mar 08 '22 at 05:32
  • Because `pwd` and `cd` are operating system commands, not SQL statements. So obviously they don't work in a tool that runs SQL statements. –  Mar 08 '22 at 06:22

0 Answers0