There are a number of things that can cause commands not to be properly terminated. I believe this answer will help others as well. This may seem too localized but I have heard of it happening to enough beginners it is worth writing up.
In general utility statements like CREATE SCHEMA or DROP SCHEMA will return something in psql, whether an error or a description of what was done. If that doesn't happen something isn't right. The first thing to do is look at the prompt.
The prompt in PostgreSQL is in the form of: [dbname][line-status][is-superuser]
So for a new line, database mydb, nonsuperuser, the prompt looks like:
mydb=>
If I am superuser I get:
mydb=#
Now the key character to look at is the one where the =
is at. Various symbols have special meanings:
=
New line (ready for new input)-
Continuation from previous line. Did you forget the semicolon?(
In a parenthesis. Your parentheses are unbalanced.$
In a dollar quote block. These are like$quote$string literal$quote$
'
Inside a single quoted string literal block"
inside a double-quoted identifier
There may be some others but these are the most common. Usually aside from =
and -
, they are pretty self-explanatory.