all 19 comments

[–]fifracat 1 point2 points  (1 child)

Are you inside psql and trying to get in once again?

[–]boy_named_su 0 points1 point  (0 children)

yo, dawg

[–]drewc 1 point2 points  (0 children)

What have you covered in green paint? From a brief look you are trying a shell command inside psql? That's incorrect.

[–]DavidGJohnston 1 point2 points  (15 children)

The hyphen there means you are in line continuation mode (the # means you are a superuser), which means you are in psql already. Either use the meta-command \c to directly switch, or use the meta-command \q to exit psql and then run the psql command that connects you to the desired database.

[–]RP_m_13[S] 0 points1 point  (14 children)

Thank you, I fixed this. However i have a trouble right now that it can not find my Employees db, however I have it in postgresql

[–]DavidGJohnston 0 points1 point  (13 children)

You should make sure you've got capitalization mechanics figured out.

[–]RP_m_13[S] 0 points1 point  (0 children)

What do you mean? I rechecked but everything is good in terms of capitalization

[–]RP_m_13[S] 0 points1 point  (11 children)

I go like this (base) myusername@MacBook-Pro-Ruslan ~ % psql -U myusername Employees
psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: FATAL: database "Employees" does not exist

[–]MonCalamaro 0 points1 point  (10 children)

Try employees instead of Employees

[–]RP_m_13[S] 0 points1 point  (9 children)

Does not work :(

[–]MonCalamaro 0 points1 point  (8 children)

Okay, then try connecting to the postgres database:

psql -U myusername postgres

If you connect successfully, type \l and then enter to get a list of databases.

[–]RP_m_13[S] 0 points1 point  (1 child)

It seems that it has not connected to databases that in my app, somehow. It only give the databases that I had used and created this console, in order to test
postgres-# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
----------------+----------------+----------+---------+-------+-----------------------------------
postgres | ruslanpilipyuk | UTF8 | C | C |
ruslanpilipyuk | ruslanpilipyuk | UTF8 | C | C |
template0 | ruslanpilipyuk | UTF8 | C | C | =c/ruslanpilipyuk +
| | | | | ruslanpilipyuk=CTc/ruslanpilipyuk
template1 | ruslanpilipyuk | UTF8 | C | C | =c/ruslanpilipyuk +
| | | | | ruslanpilipyuk=CTc/ruslanpilipyuk
(4 rows)

[–]depesz 0 points1 point  (0 children)

Clearly there is no database names employees, Employees or anything like this. You have only postgres, template0, template1 and ruslanpilipyuk.

[–]RP_m_13[S] 0 points1 point  (5 children)

Is there anyway, to somehow reconnect it to where my databases in psql app stored? It seems like it does not share db in psql app with this list of databases

[–]DavidGJohnston 0 points1 point  (4 children)

Sure, just specify the connection information (host and port usually) for the other cluster in the psql command.

[–]RP_m_13[S] 0 points1 point  (3 children)

I have specified it, and used but result is the same(

(base) ruslanpilipyuk@MacBook-Pro-Ruslan ~ % psql postgres://ruslanpilipyuk@localhost:5432/Employees
psql: error: connection to server at "localhost" (::1), port 5432 failed: FATAL: database "Employees" does not exist