SELECT c.relname AS "表名",a.attname AS "字段名",c.oid
FROM pg_class c
LEFT JOIN pg_attribute a ON a.attrelid = c.oid
WHERE c.relname NOT LIKE 'pg_%'
-- AND c.relname = 'kx_store'
AND a.attname = 'papername';
转载于:https://www.cnblogs.com/assistants/p/11573511.html