2

I've installed postgresql on my ubuntu OS with the help of this tutorial Tutorial.

I followed the first few steps to the point where i need to create ROLES but my queries doesn't execute, not even any of the select queries, it simply just move to the next line without any errors.

This seems to work for me when trying to create a new role

createuser test_user

but it doesn't prompt me with these options after the user has been created

Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) n
Shall the new role be allowed to create more new roles? (y/n) n

I can't change the privileges of these users because my queries doesn't get executed not do I get any errors.

1 Answer 1

1

but it doesn't prompt me with these options after the user has been created

That's normal with a recent PostgreSQL client. Add the --interactive option to be prompted with the options like the older version used by your tutorial.

From the manpage:

  --interactive
       Prompt for the user name if none is specified on the command line, and also prompt for
       whichever of the options -d/-D, -r/-R, -s/-S is not specified on the command line. (This
       was the default behavior up to PostgreSQL 9.1.)

About the queries that don't execute:

my queries doesn't execute, not even any of the select queries, it simply just move to the next line without any errors

You problably forget to finish the queries with a semi-colon. Or, the query has an unbalanced simple or double quote, and the interpreter waits for you to close the quoted section. Edit your question with an exact copy-paste of what you have displayed on psql if you need more help about this. The prompt in psql reveals what states it's in and what it's waiting for.

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

1 Comment

I ended up using phppgadmin because of of a deadline but will definitely make use of your info, thanks guy!

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.