In some superuser cases it is superuser worth typing -W to avoid the user extra user connection attempt.
Synopsis, create user name make with option.
I -no-inherit, the new role will not automatically inherit privileges of maken roles it is a postgres member.P -pwprompt If given, createuser lotusbloem will issue a prompt for phone the password of the new user.Once an application no longer requires constant development, it needs stars periodic maintenance for maken stable and secure operation.Alter role name IN database database_name SET maker configuration_parameter superuser from current.Compatibility, the create user statement is a PostgreSQL extension.For more information, see the create role reference page.As soon as you press Enter, PostgreSQL deletes the database and all of the data make it contains.Alter role name rename TO new_name.SET from current saves the session's current value of the parameter as the role-specific value.
Creating PostgreSQL databases, to create a PostgreSQL database, follow these steps: At the maker command line, type the following command as the server's root user: su - postgres.
The remaining variants change type a role's session default for a configuration variable, either for all databases or, when the IN database clause logo is movie specified, only for sessions in the named database.
Only superusers and type users with createrole privilege can create new users, so createuser must be lookx invoked by someone who can connect as a superuser or a user nude with createrole privilege.
If the server make requires password authentication and a password is not available by other means such.pgpass file, the connection attempt will fail.
The password will be transmitted to the server in cleartext, and it might also be logged in the client's command history or the server log.Options createuser accepts the following command-line arguments: username, specifies the name of the PostgreSQL user to be created.e -echo, echo make the commands that createuser generates and sends to the server.Alter role name IN database database_name SET configuration_parameter TO value default.As you type see, the password is encrypted before it is sent to the client.help Show help movie about createuser command line arguments, and exit.Replace user with the name of the user that you want to own the database, and replace dbname with the name of the database that you want to create: createdb -O friendship user dbname, postgreSQL users that have permission maker to create databases can do so from.This name must be different from all existing roles in this PostgreSQL installation.