I have installed PostgreSQL on my FreeBSD 8.2 box. How can I open the SQL prompt so I can write SQL queries?
I can do:
su pgsql
Which opens a prompt but I cannot write SQL queries like SELECT or CREATE there. Sorry, I am new to PostgreSQL.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I use django’s management command
python manage.py dbshellto open the database-specific connection (same across dev / production).It does other useful things like specifying the database and username listed in
settings.pyOtherwise I’d have to type in something like
psql db_name -U user