Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

postgresql: CREATE ROLE does not work [closed]

I get the error FATAL role does not exist when doing a rake db:create:all.

The post here asks the same question, except that the answer doesn't work.

Travis CI: FATAL: role does not exist

I get to the postgresql console this way: 'sudo -u postgres psql'

Typing

CREATE ROLE X SUPERUSER 
CREATE ROLE X CREATEDB LOGIN 

or anything for that matter, at the postgres=# prompt does nothing. Absolutely nothing. It doesn't give me a success or fail message or any acknowledgement message whatsoever.

When I type \du to list roles, only the postgres role is there.

like image 452
Nathan McKaskle Avatar asked Oct 02 '12 19:10

Nathan McKaskle


1 Answers

I discovered that much like MySQL, postgresql requires that I use semi colons at the end of a command.

I'm too used to MS SQl not requiring it.

like image 199
Nathan McKaskle Avatar answered Oct 18 '22 18:10

Nathan McKaskle