Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA30545 for ; Mon, 23 Aug 1999 10:31:45 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id KAA23327; Mon, 23 Aug 1999 10:30:42 -0400 (EDT) To: Robert Hiltibidal cc: pgsql-interfaces@postgresql.org Subject: Re: [INTERFACES] Perl Interface In-reply-to: Your message of Mon, 23 Aug 1999 08:45:41 -0500 <3.0.6.32.19990823084541.008ffec0@y2k.state.il.us> Date: Mon, 23 Aug 1999 10:30:42 -0400 Message-ID: <23325.935418642@sss.pgh.pa.us> From: Tom Lane Robert Hiltibidal 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