PostgreSQL: create role and schema


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)

Published: Dec. 6, 2021

Change Content

The information on this page is user generated content. The content does not claim to be complete or correct.

Everybody is invited to add or change the data. Just click on this link. No login or email is required. Thanks.