openGauss=# \d
********* QUERY **********
SELECT n.nspname as "Schema",
c.relname as "Name",
CASE c.relkind WHEN'r'THEN'table'WHEN'v'THEN'view'WHEN'i'THEN'index'WHEN'I'THEN'global partition index'WHEN'S'THEN'sequence'WHEN's'THEN'special'WHEN'f'THEN'foreign table'WHEN'm'THEN'materialized view'WHEN'e'THEN'stream'WHEN'o'THEN'contview'ENDas "Type",
pg_catalog.pg_get_userbyid(c.relowner) as "Owner",
c.reloptions as "Storage"
FROM pg_catalog.pg_class c
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
WHERE c.relkind IN ('r','v','m','S','f','e','o','')
AND n.nspname <> 'pg_catalog'AND n.nspname <> 'db4ai'AND n.nspname <> 'information_schema'AND n.nspname !~ '^pg_toast'AND c.relname notlike'matviewmap_%'AND c.relname notlike'mlog_%'AND pg_catalog.pg_table_is_visible(c.oid)
ORDERBY1,2;
**************************
List of relations
Schema | Name | Type | Owner | Storage--------+--------+-------+-------+----------------------------------public | test | table | omm | {orientation=row,compression=no}
public | v_test | view | omm |
(2rows)
openGauss=# \dt
********* QUERY **********
SELECT n.nspname as "Schema",
c.relname as "Name",
CASE c.relkind WHEN'r'THEN'table'WHEN'v'THEN'view'WHEN'i'THEN'index'WHEN'I'THEN'global partition index'WHEN'S'THEN'sequence'WHEN's'THEN'special'WHEN'f'THEN'foreign table'WHEN'm'THEN'materialized view'WHEN'e'THEN'stream'WHEN'o'THEN'contview'ENDas "Type",
pg_catalog.pg_get_userbyid(c.relowner) as "Owner",
c.reloptions as "Storage"
FROM pg_catalog.pg_class c
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
WHERE c.relkind IN ('r','')
AND n.nspname <> 'pg_catalog'AND n.nspname <> 'db4ai'AND n.nspname <> 'information_schema'AND n.nspname !~ '^pg_toast'AND c.relname notlike'matviewmap_%'AND c.relname notlike'mlog_%'AND pg_catalog.pg_table_is_visible(c.oid)
ORDERBY1,2;
**************************
List of relations
Schema | Name | Type | Owner | Storage--------+------+-------+-------+----------------------------------public | test | table | omm | {orientation=row,compression=no}
(1row)
openGauss=# \dt+
********* QUERY **********
SELECT n.nspname as "Schema",
c.relname as "Name",
CASE c.relkind WHEN'r'THEN'table'WHEN'v'THEN'view'WHEN'i'THEN'index'WHEN'I'THEN'global partition index'WHEN'S'THEN'sequence'WHEN's'THEN'special'WHEN'f'THEN'foreign table'WHEN'm'THEN'materialized view'WHEN'e'THEN'stream'WHEN'o'THEN'contview'ENDas "Type",
pg_catalog.pg_get_userbyid(c.relowner) as "Owner",
pg_catalog.pg_size_pretty(pg_catalog.pg_table_size(c.oid)) as "Size",
c.reloptions as "Storage",
pg_catalog.obj_description(c.oid, 'pg_class') as "Description"
FROM pg_catalog.pg_class c
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
WHERE c.relkind IN ('r','')
AND n.nspname <> 'pg_catalog'AND n.nspname <> 'db4ai'AND n.nspname <> 'information_schema'AND n.nspname !~ '^pg_toast'AND c.relname notlike'matviewmap_%'AND c.relname notlike'mlog_%'AND pg_catalog.pg_table_is_visible(c.oid)
ORDERBY1,2;
**************************
List of relations
Schema | Name | Type | Owner | Size | Storage | Description
--------+------+-------+-------+---------+----------------------------------+-------------public | test | table | omm | 0 bytes | {orientation=row,compression=no} |
(1row)
openGauss=# \di
********* QUERY **********
SELECT n.nspname as "Schema",
c.relname as "Name",
CASE c.relkind WHEN'r'THEN'table'WHEN'v'THEN'view'WHEN'i'THEN'index'WHEN'I'THEN'global partition index'WHEN'S'THEN'sequence'WHEN's'THEN'special'WHEN'f'THEN'foreign table'WHEN'm'THEN'materialized view'WHEN'e'THEN'stream'WHEN'o'THEN'contview'ENDas "Type",
pg_catalog.pg_get_userbyid(c.relowner) as "Owner",
c2.relname as "Table",
c.reloptions as "Storage"
FROM pg_catalog.pg_class c
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
LEFT JOIN pg_catalog.pg_index i ON i.indexrelid = c.oid
LEFT JOIN pg_catalog.pg_class c2 ON i.indrelid = c2.oid
WHERE c.relkind IN ('i','I','')
AND n.nspname <> 'pg_catalog'AND n.nspname <> 'db4ai'AND n.nspname <> 'information_schema'AND n.nspname !~ '^pg_toast'AND c.relname notlike'matviewmap_%'AND c.relname notlike'mlog_%'AND pg_catalog.pg_table_is_visible(c.oid)
ORDERBY1,2;
**************************
List of relations
Schema | Name | Type | Owner | Table | Storage--------+-------------+-------+-------+-------+---------public | idx_id_test | index | omm | test |
(1row)
openGauss=# \di idx_id_test
********* QUERY **********
SELECT n.nspname as "Schema",
c.relname as "Name",
CASE c.relkind WHEN'r'THEN'table'WHEN'v'THEN'view'WHEN'i'THEN'index'WHEN'I'THEN'global partition index'WHEN'S'THEN'sequence'WHEN's'THEN'special'WHEN'f'THEN'foreign table'WHEN'm'THEN'materialized view'WHEN'e'THEN'stream'WHEN'o'THEN'contview'ENDas "Type",
pg_catalog.pg_get_userbyid(c.relowner) as "Owner",
c2.relname as "Table",
c.reloptions as "Storage"
FROM pg_catalog.pg_class c
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
LEFT JOIN pg_catalog.pg_index i ON i.indexrelid = c.oid
LEFT JOIN pg_catalog.pg_class c2 ON i.indrelid = c2.oid
WHERE c.relkind IN ('i','I','s','')
AND n.nspname !~ '^pg_toast'AND c.relname notlike'matviewmap_%'AND c.relname notlike'mlog_%'AND c.relname ~ '^(idx_id_test)$'AND pg_catalog.pg_table_is_visible(c.oid)
ORDERBY1,2;
**************************
List of relations
Schema | Name | Type | Owner | Table | Storage--------+-------------+-------+-------+-------+---------public | idx_id_test | index | omm | test |
(1row)
openGauss=# \dv
********* QUERY **********
SELECT n.nspname as "Schema",
c.relname as "Name",
CASE c.relkind WHEN'r'THEN'table'WHEN'v'THEN'view'WHEN'i'THEN'index'WHEN'I'THEN'global partition index'WHEN'S'THEN'sequence'WHEN's'THEN'special'WHEN'f'THEN'foreign table'WHEN'm'THEN'materialized view'WHEN'e'THEN'stream'WHEN'o'THEN'contview'ENDas "Type",
pg_catalog.pg_get_userbyid(c.relowner) as "Owner",
c.reloptions as "Storage"
FROM pg_catalog.pg_class c
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
WHERE c.relkind IN ('v','')
AND n.nspname <> 'pg_catalog'AND n.nspname <> 'db4ai'AND n.nspname <> 'information_schema'AND n.nspname !~ '^pg_toast'AND c.relname notlike'matviewmap_%'AND c.relname notlike'mlog_%'AND pg_catalog.pg_table_is_visible(c.oid)
ORDERBY1,2;
**************************
List of relations
Schema | Name | Type | Owner | Storage--------+--------+------+-------+---------public | v_test | view | omm |
(1row)
openGauss=# \ds
********* QUERY **********
SELECT n.nspname as "Schema",
c.relname as "Name",
CASE c.relkind WHEN'r'THEN'table'WHEN'v'THEN'view'WHEN'i'THEN'index'WHEN'I'THEN'global partition index'WHEN'S'THEN'sequence'WHEN's'THEN'special'WHEN'f'THEN'foreign table'WHEN'm'THEN'materialized view'WHEN'e'THEN'stream'WHEN'o'THEN'contview'ENDas "Type",
pg_catalog.pg_get_userbyid(c.relowner) as "Owner",
c.reloptions as "Storage"
FROM pg_catalog.pg_class c
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
WHERE c.relkind IN ('S','')
AND n.nspname <> 'pg_catalog'AND n.nspname <> 'db4ai'AND n.nspname <> 'information_schema'AND n.nspname !~ '^pg_toast'AND c.relname notlike'matviewmap_%'AND c.relname notlike'mlog_%'AND pg_catalog.pg_table_is_visible(c.oid)
ORDERBY1,2;
**************************
List of relations
Schema | Name | Type | Owner | Storage--------+------+----------+-------+---------public | sq1 | sequence | omm |
(1row)