CREATE USER (Deprecated)
|
|
CREATE USER defines a new database user account.
By default, users accounts do not have SUPERUSER status.
Only a superuser can issue CREATE USER requests.
User accounts are required for logging in under internal authentication and authorization.
Enclose the user name in single quotation marks if it contains non-alphanumeric characters. You cannot re-create an existing user. To change the superuser status, password or hashed password, use ALTER USER.
Synopsis
CREATE USER [ IF NOT EXISTS ] <user_name>
( WITH PASSWORD '<user_password>' |
WITH HASHED PASSWORD '<hashed_user_password>' )
[ ( SUPERUSER | NOSUPERUSER ) ] ;
| Syntax conventions | Description |
|---|---|
UPPERCASE |
Literal keyword. |
Lowercase |
Not literal. |
|
Variable value. Replace with a user-defined value. |
|
Optional.
Square brackets ( |
|
Group.
Parentheses ( |
|
Or.
A vertical bar ( |
|
Repeatable.
An ellipsis ( |
|
Single quotation ( |
|
Map collection.
Braces ( |
|
Set, list, map, or tuple.
Angle brackets ( |
|
End CQL statement.
A semicolon ( |
|
Separate the command line options from the command arguments with two hyphens ( |
|
Search CQL only: Single quotation marks ( |
|
Search CQL only: Identify the entity and literal value to overwrite the XML element in the schema and solrConfig files. |
Example
Use WITH PASSWORD to create a user account for internal authentication, enclosing the password in single quotation marks:
CREATE USER spillman WITH PASSWORD 'Niner27';
If internal authentication has not been set up, WITH PASSWORD is not required:
CREATE USER tony NOSUPERUSER;