Difference between revisions of "PostgreSQL: CREATE USER"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
Tags: Mobile web edit, Mobile edit
Line 3: Line 3:
  
 
== Examples ==
 
== Examples ==
* <code>create user <username></code>
+
* <code>create user your_username</code>
  
 
  create user your_username;
 
  create user your_username;
 
 
  Output:
 
  Output:
 
  [[CREATE ROLE]]
 
  [[CREATE ROLE]]
  
 
  CREATE USER your_username WITH ENCRYPTED PASSWORD 'your_pass';
 
  CREATE USER your_username WITH ENCRYPTED PASSWORD 'your_pass';
 
 
  Output:
 
  Output:
 
  [[CREATE ROLE]]
 
  [[CREATE ROLE]]
  
 
+
* List users: <code>[[\du]]</code>
 
 
* List users: <code>\du</code>
 
  
 
== Related terms ==
 
== Related terms ==

Revision as of 06:39, 9 September 2021

create user, creates a new user in PostgreSQL

Examples

  • create user your_username
create user your_username;
Output:
CREATE ROLE
CREATE USER your_username WITH ENCRYPTED PASSWORD 'your_pass';
Output:
CREATE ROLE
  • List users: \du

Related terms

See also

Advertising: