PostgreSql如何新增使用者

Posted by on | |

psql 進入後,下底下的指令即可:

CREATE USER username WITH PASSWORD 'password';
ALTER USER username  WITH PASSWORD 'password' VALID UNTIL 'infinity';
ALTER USER username  WITH PASSWORD 'password' VALID UNTIL 'Jan 31 2030';

參考資料:
http://www.postgresql.org/docs/8.0/static/sql-alteruser.html
http://www.cyberciti.biz/faq/howto-add-postgresql-user-account/

0 意見: