Psql: Difference between revisions
No edit summary |
No edit summary |
||
Line 14: | Line 14: | ||
test-> | test-> | ||
==List roles== | |||
test-> \dg | test-> \dg | ||
List of roles | List of roles | ||
Line 21: | Line 22: | ||
postgres | Superuser, Create role, Create DB, Replication | {} | postgres | Superuser, Create role, Create DB, Replication | {} | ||
tobiasco | Create DB | {} | tobiasco | Create DB | {} | ||
But http://www.postgresql.org/docs/9.3/static/sql-createdatabase.html says | |||
"To create a database, you must be a superuser or have the special CREATEDB privilege." | |||
Where to find "privilege"-listing? |
Revision as of 2013-11-21T10:37:38
Create database
tobiasco@main:/root$ psql CREATE DATABASE test2; psql: warning: extra command-line argument "test2" ignored psql: FATAL: Peer authentication failed for user "DATABASE"
Create table
tobiasco@main:/root$ psql test psql (9.3.1) Type "help" for help. test=> CREATE TABLE testtable test-> \dt test No matching relations found. test->
List roles
test-> \dg List of roles Role name | Attributes | Member of -----------+------------------------------------------------+----------- gis | | {} postgres | Superuser, Create role, Create DB, Replication | {} tobiasco | Create DB | {}
But http://www.postgresql.org/docs/9.3/static/sql-createdatabase.html says
"To create a database, you must be a superuser or have the special CREATEDB privilege."
Where to find "privilege"-listing?