在pg數據庫中,可以通過查詢系統表pg_description來查看表字段的注釋。具體操作步驟如下:
登錄到pg數據庫中。
執行以下SQL語句查詢表字段的注釋:
SELECT
pgd.description as field_description,
pgc.relname as table_name,
pg_attribute.attname as field_name
FROM
pg_description pgd
JOIN
pg_class pgc ON pgd.objoid = pgc.oid
JOIN
pg_attribute ON pgd.objsubid = pg_attribute.attnum
這樣就可以查看到表字段的注釋信息。