SELECT DISTINCT C.relname AS tabname,obj_description ( C.oid ) AS COMMENT FROM (SELECT DISTINCT tablename, schemaname FROM pg_tables WHERE POSITION ( '_2' IN tablename ) = 0) ts
LEFT JOIN pg_class C ON C.relname = ts.tablename WHERE obj_description ( C.oid ) is not null;
标签:postgreSQL,DISTINCT,tablename,ts,查询,pg,SELECT,结构
From: https://www.cnblogs.com/ikai/p/17184793.html