From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Hiltibidal <rob(at)y2k(dot)state(dot)il(dot)us> |
Cc: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | Re: [INTERFACES] Perl Interface |
Date: | 1999-08-23 14:30:42 |
Message-ID: | 23325.935418642@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
Robert Hiltibidal <rob(at)y2k(dot)state(dot)il(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Doyle | 1999-08-23 15:38:02 | Access 2000 |
Previous Message | Robert Hiltibidal | 1999-08-23 13:45:41 | Perl Interface |