Search PostgreSQL documentation
PG 18 · Browse by category, or enter a name or keyword
Category index802
createdb --username=username-U username--username=username
User name to connect as.createdb › Options
createdb --version-V--version
Print the createdb version and exit.createdb › Options
createusercreateuser createuser — define a new PostgreSQL user account
Synopsis createuser [connection-option...] [option...] [username]createuser
createuser --bypassrls--bypassrls
The new user will bypass every row-level security (RLS) policy.createuser › Options
createuser --connection-limit=number-c number--connection-limit=number
Set a maximum number of connections for the new user. The default is to set no limit.createuser › Options
createuser --createdb-d--createdb
The new user will be allowed to create databases.createuser › Options
createuser --createrole-r--createrole
The new user will be allowed to create, alter, drop, comment on, change the security label for other roles; that is, this user will have CREATEROLE privilege. See role creatio…createuser › Options
createuser --echo-e--echo
Echo the commands that createuser generates and sends to the server.createuser › Options
createuser --encrypted-E--encrypted
This option is obsolete but still accepted for backward compatibility.createuser › Options
createuser --help-?--help
Show help about createuser command line arguments, and exit.createuser › Options
createuser --host=host-h host--host=host
Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket.createuser › Options
createuser --inherit-i--inherit
The new role will automatically inherit privileges of roles it is a member of. This is the default.createuser › Options
createuser --interactive--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 …createuser › Options
createuser --login-l--login
The new user will be allowed to log in (that is, the user name can be used as the initial session user identifier). This is the default.createuser › Options
createuser --no-bypassrls--no-bypassrls
The new user will not bypass row-level security (RLS) policies. This is the default.createuser › Options
createuser --no-createdb-D--no-createdb
The new user will not be allowed to create databases. This is the default.createuser › Options
createuser --no-createrole-R--no-createrole
The new user will not be allowed to create new roles. This is the default.createuser › Options
createuser --no-inherit-I--no-inherit
The new role will not automatically inherit privileges of roles it is a member of.createuser › Options
createuser --no-login-L--no-login
The new user will not be allowed to log in. (A role without login privilege is still useful as a means of managing database permissions.)createuser › Options
createuser --no-password-w--no-password
Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt wi…createuser › Options
createuser --no-replication--no-replication
The new user will not have the REPLICATION privilege, which is described more fully in the documentation for CREATE ROLE. This is the default.createuser › Options
createuser --no-superuser-S--no-superuser
The new user will not be a superuser. This is the default.createuser › Options
createuser --password-W--password
Force createuser to prompt for a password (for connecting to the server, not for the password of the new user). This option is never essential, since createuser will automatical…createuser › Options
createuser --port=port-p port--port=port
Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections.createuser › Options
createuser --pwprompt-P--pwprompt
If given, createuser will issue a prompt for the password of the new user. This is not necessary if you do not plan on using password authentication.createuser › Options
createuser --replication--replication
The new user will have the REPLICATION privilege, which is described more fully in the documentation for CREATE ROLE.createuser › Options
createuser --role=role-g role--member-of=role--role=role (deprecated)
Specifies the new role should be automatically added as a member of the specified existing role. Multiple existing roles can be specified by w…createuser › Options
createuser --superuser-s--superuser
The new user will be a superuser.createuser › Options
createuser --username=username-U username--username=username
User name to connect as (not the user name to create).createuser › Options
createuser --valid-until=timestamp-v timestamp--valid-until=timestamp
Set a date and time after which the role's password is no longer valid. The default is to set no password expiry date.createuser › Options
createuser --version-V--version
Print the createuser version and exit.createuser › Options
createuser --with-admin=role-a role--with-admin=role
Specifies an existing role that will be automatically added as a member of the new role with admin option, giving it the right to grant membership in the new role to…createuser › Options
createuser --with-member=role-m role--with-member=role
Specifies an existing role that will be automatically added as a member of the new role. Multiple existing roles can be specified by writing multiple -m switches.createuser › Options
dbnamedbname
The database name. Defaults to be the same as the user name. In certain contexts, the value is checked for extended formats; see Section 32.1.1 for more details on those.Database Connection Control Functions › Parameter Key Words
dropdbdropdb dropdb — remove a PostgreSQL database
Synopsis dropdb [connection-option...] [option...] dbnamedropdb
dropdb --echo-e--echo
Echo the commands that dropdb generates and sends to the server.dropdb › Options
dropdb --force-f--force
Attempt to terminate all existing connections to the target database before dropping it. See DROP DATABASE for more information on this option.dropdb › Options
dropdb --help-?--help
Show help about dropdb command line arguments, and exit.dropdb › Options
dropdb --host=host-h host--host=host
Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket.dropdb › Options
dropdb --if-exists--if-exists
Do not throw an error if the database does not exist. A notice is issued in this case.dropdb › Options
More results
Find definitions in the PostgreSQL manuals, reference library, and extension catalogue.
pg17: choose a version ex: extensions only ↑↓ select ↵ open