Select attname
FROM pg_attribute
WHERE attrelid = 'tableName'::regclass
AND attnum >= 1 -- exclude tableoid & friends (neg. attnum)
AND attisdropped is FALSE -- exclude deleted columns
FROM pg_attribute
WHERE attrelid = 'tableName'::regclass
AND attnum >= 1 -- exclude tableoid & friends (neg. attnum)
AND attisdropped is FALSE -- exclude deleted columns
No comments:
Post a Comment