howto get column names of tables in a script..

Started by jeromeover 23 years ago2 messagesgeneral
Jump to latest
#1jerome
jerome@gmanmi.tv

im using tcl a my scirpting languange is there a possibility of getting column
names of a table?

pg_tables only show the table names...

my purpose is for a report page w/c would dynamically show table column names
which would be presented in a html table format....

TIA

#2Martijn van Oosterhout
kleptog@svana.org
In reply to: jerome (#1)
Re: howto get column names of tables in a script..

On Wed, Oct 02, 2002 at 06:00:59PM +0800, jerome wrote:

im using tcl a my scirpting languange is there a possibility of getting column
names of a table?

pg_tables only show the table names...

my purpose is for a report page w/c would dynamically show table column names
which would be presented in a html table format....

If you use psql -E and do a \d tablename you will see that the relevent
table is pg_attributes.

--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/

Show quoted text

There are 10 kinds of people in the world, those that can do binary
arithmetic and those that can't.