postgresql中all_tables和all_tab_columns的等价物

Amr*_*rin 6 postgresql

我正在尝试运行oracle查询

SELECT OWNER,  
       TABLE_NAME 
FROM ALL_TABLES;

SELECT COLUMN_NAME, 
       DATA_TYPE, 
       DATA_LENGTH, 
       NULLABLE, 
       COLUMN_ID, 
       DATA_PRECISION, 
       DATA_SCALE 
FROM ALL_TAB_COLUMNS 
Run Code Online (Sandbox Code Playgroud)

在postgresql但它无法执行,因为PostgreSQL没有ALL_TAB_COLUMNS和ALL_TABLES

任何机构都可以建议什么是相同的查询

a_h*_*ame 12

ALL_TABLES等同于(ANSI标准)视图information_schema.tables:http://www.postgresql.org/docs/current/static/infoschema-tables.html

ALL_TAB_COLUMNS等同于(ANSI标准)视图information_schema.columns:http://www.postgresql.org/docs/current/static/infoschema-columns.html

  • 通过手册比在stackoverflow上查找要多得多.我非常喜欢,Amrin问了这个问题你回答了.谢谢你们两个 (6认同)