pg_class:oid与relname互查
SELECT oid FROM pg_class WHERE relname = 'mytable';
SELECT relname FROM pg_class WHERE oid in (16391,16394,16397);
根据表名称获取其所有属性:
SELECT * FROM pg_attribute WHERE attrelid = 'mytable'::regclass;
参考> https://www.jianshu.com/p/1f096df47f83