I am just learning sql and starting with PostgreSQL. Here is what I am trying to do:
psql postgres
CREATE DATABASE newdb;
Then I want to do something like this (in the same psql session)
CONNECT DATABASE newdb;
Of course this doesn’t work. But after doing the statement I should be able to do something like:
CREATE TABLE newtable
And “newtable” should appear in the newdb database. I feel like there’s something simple that I’m missing.
On the shell you just do
\cfor connecting: