From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Hiltibidal <rob@y2k.state.il.us>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: [INTERFACES] Perl Interface
Date: Mon, 23 Aug 1999 10:30:42 -0400
Message-ID: <23325.935418642@sss.pgh.pa.us> (raw)
In-Reply-To: <3.0.6.32.19990823084541.008ffec0@y2k.state.il.us>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: tgl@sss.pgh.pa.us, rob@y2k.state.il.us
Subject: Re: [INTERFACES] Perl Interface
In-Reply-To: <23325.935418642@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox