Skip site navigation (1) Skip section navigation (2)

Re: [INTERFACES] Perl Interface

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: (view raw, whole thread or download thread mbox)
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

			regards, tom lane

pgsql-interfaces by date

Next:From: Michael DoyleDate: 1999-08-23 15:38:02
Subject: Access 2000
Previous:From: Robert HiltibidalDate: 1999-08-23 13:45:41
Subject: Perl Interface

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group