Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to change postgresql password if my username contains period

Tags:

postgresql

I want to change my pg/sql pwd using the syntax

alter user username WITH PASSWORD '*****';

The problem is that my user name contains a period, like user.name, and it seems the system doesn't allow a period in user name.

So how can I change my password?

like image 670
user1751221 Avatar asked Nov 09 '12 18:11

user1751221


1 Answers

You have to double-quote otherwise illegal identifiers. More in the manual.

ALTER USER "a.b" WITH PASSWORD '*****';

Better yet: never use illegal strings to begin with.

like image 190
Erwin Brandstetter Avatar answered Nov 09 '22 16:11

Erwin Brandstetter