Re: Get a list of columns for a table

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Cc: "Kevin Crenshaw" <kcrenshaw(at)viscient(dot)com>
Subject: Re: Get a list of columns for a table
Date: 2005-09-07 23:41:50
Message-ID: 200509071641.51015.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Kevin,

> How do I retrieve a list of columns for a table from an outside
> application? I don't want to retrieve any rows from the table just the
> column related data like what is retrieved using '\d [table name]' in
> psql. Can this be done using a simple Select statement?

Yes. Look up INFORMATION_SCHEMA in the PostgreSQL Docs.

--
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message operationsengineer1 2005-09-07 23:48:36 Weird SQL Problem
Previous Message Terry Lee Tucker 2005-09-07 22:41:32 Re: Get a list of columns for a table