Skip to content

Instantly share code, notes, and snippets.

@ygpark2
Created July 22, 2014 07:05
Show Gist options
  • Save ygpark2/568b177cf19571e3fa1e to your computer and use it in GitHub Desktop.
Save ygpark2/568b177cf19571e3fa1e to your computer and use it in GitHub Desktop.
PostgreSQL 명령어
Options:
-c, --connection-limit=N connection limit for role (default: no limit)
-d, --createdb role can create new databases
-D, --no-createdb role cannot create databases (default)
-e, --echo show the commands being sent to the server
-E, --encrypted encrypt stored password
-i, --inherit role inherits privileges of roles it is a
member of (default)
-I, --no-inherit role does not inherit privileges
-l, --login role can login (default)
-L, --no-login role cannot login
-N, --unencrypted do not encrypt stored password
-P, --pwprompt assign a password to new role
-r, --createrole role can create new roles
-R, --no-createrole role cannot create roles (default)
-s, --superuser role will be superuser
-S, --no-superuser role will not be superuser (default)
-V, --version output version information, then exit
--interactive prompt for missing role name and attributes rather
than using defaults
--replication role can initiate replication
--no-replication role cannot initiate replication
-?, --help show this help, then exit
createuser -U postgres -d -e -E -l -P -r -s <my_name> # 슈퍼유저와 유저 생성 권한
createuser -U postgres -d -e -E -l -P <my_name> # 디비 생성 권한만
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment