Pivotal Knowledge Base

Follow

Create numeric user returns syntax error at or near "XXXX"

Environment

Product Version
Pivotal HDB 1.x, 2.0.0
OS RHEL 6.x

Symptom

When trying to create a user with only numbers, a syntax error is returned:

Error Message:

gpadmin=# create user 1234 with login password 'password' ;
ERROR:  syntax error at or near "1234"
LINE 1: create user 1234 with login password 'password' ;             ^

Cause 

Numeric only usernames are not allowed in HDB.

Resolution

Prefix some characters to the user name. For example:

gpadmin=# create user u_1234 with login password 'password' ;
NOTICE:  resource queue required -- using default resource queue "pg_default"
CREATE ROLE
gpadmin=#

Comments

Powered by Zendesk