Files
DBAdmin/inbox/DataBase/PostgreSQL/object_management/find_objects.sql
T
2026-05-18 06:40:19 +00:00

27 lines
862 B
SQL

-- Below of any commands can be used to find the schema details:
postgres=# select schema_name,schema_owner from information_schema.schemata;
schema_name | schema_owner
--------------------+--------------
raj | postgres
information_schema | postgres
public | postgres
pg_catalog | postgres
pg_toast_temp_1 | postgres
pg_temp_1. | postgres
pg_toast | postgres
(7 rows)
postgres=# select nspname as schema_name , pg_get_userbyid(nspowner) as schema_owner from pg_catalog.pg_namespace;
schema_name | schema_owner
--------------------+--------------
pg_toast | postgres
pg_temp_1 | postgres
pg_toast_temp_1 | postgres
pg_catalog | postgres
public | postgres
information_schema | postgres
raj | postgres
(7 rows)
postgres=# \dn+