Robert Hiltibidal <rob@y2k.state.il.us> writes:
> How can I get perl to pull the field names from a table?
This isn't specifically a perl question, it's just a matter of knowing
which system tables to look in. Try
select attname from pg_attribute, pg_class where
attrelid = pg_class.oid and attnum > 0 and relname = 'XXX';
BTW, it's easy to explore the system tables in psql. Use \dS to get
a list of system tables, and then \d and normal SQL commands to look
at any of them that sound interesting. Or look at the definitions in
pgsql/src/include/catalog/.
regards, tom lane