Re: [INTERFACES] Perl Interface - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: [INTERFACES] Perl Interface
Date
Msg-id 23325.935418642@sss.pgh.pa.us
Whole thread Raw
In response to Perl Interface  (Robert Hiltibidal <rob@y2k.state.il.us>)
List pgsql-interfaces
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


pgsql-interfaces by date:

Previous
From: Robert Hiltibidal
Date:
Subject: Perl Interface
Next
From: "Rontxi A."
Date:
Subject: subscribe