[PostgreSQL][RDS]特定ユーザーの作成とDB作成

LINEで送る
Pocket

  • 特定ユーザーのみ作成
CREATE ROLE hoge-user WITH PASSWORD 'xxxxxxxx' NOSUPERUSER NOCREATEDB NOCREATEROLE LOGIN;
  • 特定ユーザーとそれに伴うDBの作成
CREATE ROLE hogehoge WITH PASSWORD 'xxxxxxxx' NOSUPERUSER NOCREATEDB NOCREATEROLE LOGIN;

GRANT hogehoge TO root;

CREATE DATABASE hoge_db WITH OWNER hogehoge;

- digdagの場合
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";

 

Was this helpful?

0 / 0

コメントを残す 0

Your email address will not be published. Required fields are marked *