PostgreSQL: create role and schema

2019-09-16 15:38:41+00

create role dj2 with password 'topsecret' login; CREATE ROLE # create schema dj2 authorization dj2; CREATE SCHEMA # select s.nspname as table_schema, s.oid as schema_id, u.usename as owner from pg_catalog.pg_namespace s join pg_catalog.pg_user u on u.usesysid = s.nspowner order by table_schema; table_schema | schema_id | owner --------------------+-----------+------------- information_schema | 13157 | postgres pg_catalog | 11 | postgres pg_temp_1 | 11804 | postgres pg_toast | 99 | postgres pg_toast_temp_1 | 11805 | postgres public | 2200 | postgres (6 rows)

Tag: postgresql