0

I am trying to remove a db in postgresql but its still viewable in the mac native app even after I have confirmed its been removed from the terminal. Should I be concerned?

Here is my terminal command and output

drop database if exists Javascript_Rails_Project_development;
NOTICE:  database "javascript_rails_project_development" does not exist, skipping
DROP DATABASE

database image

1 Answer 1

1

You possibly created the database putting its name in double quotes as "Javascript_Rails_Project_development". Note the upper case letters.

Usually identifiers in SQL are case insensitive. If you quote them in such a way however, they become case sensitive. That is, there is no database named javascript_rails_project_development as the letters are all lower case.

Once created with the name double quotes and including upper case characters you need to address the object afterwards by a name in double quotes with the exact matching cases of the letters.

Try:

DROP DATABASE IF EXISTS "Javascript_Rails_Project_development" ;

And possibly avoid upper case and quoted names in the future all together. It's just making things more complicated in most of the cases.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.