Re: howto get column names of tables in a script..

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: jerome <jerome(at)gmanmi(dot)tv>
Cc: PostgresGeneral <pgsql-general(at)postgresql(dot)org>
Subject: Re: howto get column names of tables in a script..
Date: 2002-10-02 10:47:36
Message-ID: 20021002104736.GA6875@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)svana(dot)org> http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message M. I. 2002-10-02 10:51:03 Inheritance: delete parent deletes children
Previous Message jerome 2002-10-02 10:00:59 howto get column names of tables in a script..