catalog
pg_attribute
Describes relation attributes; filter system columns and dropped attributes when listing live user columns.
Formal Syntax & Structure
sql syntaxsql
SELECT attname FROM pg_catalog.pg_attribute WHERE attrelid = 'bm_lab.items'::regclass AND attnum > 0 AND NOT attisdropped ORDER BY attnum;Working Example
Example Snippetsql
-- Disposable PostgreSQL lab only; see LAB.md.SELECT attname FROM pg_catalog.pg_attribute WHERE attrelid = 'bm_lab.items'::regclass AND attnum > 0 AND NOT attisdropped ORDER BY attnum;