Merge "[HOLMES] Bumped the version of holmes-rule-mgmt"
[oom.git] / kubernetes / common / postgres-init / resources / config / setup.sql
1 --- User Setup
2 CREATE USER "${PG_USER}" LOGIN;
3 ALTER USER "${PG_USER}" PASSWORD '${PG_PASSWORD}';
4
5 CREATE DATABASE ${PG_DATABASE};
6 GRANT ALL PRIVILEGES ON DATABASE ${PG_DATABASE} TO "${PG_USER}";
7
8 --- PG_DATABASE Setup
9
10 \c ${PG_DATABASE}
11
12 CREATE EXTENSION IF NOT EXISTS pg_stat_statements;
13 CREATE EXTENSION IF NOT EXISTS pgaudit;
14
15 --- Create schema for PG_USER
16
17 \c ${PG_DATABASE}
18
19 CREATE SCHEMA IF NOT EXISTS "${PG_USER}" AUTHORIZATION "${PG_USER}";