query on table name to return columns and data types?

Started by blackwater devover 19 years ago3 messagesgeneral
Jump to latest
#1blackwater dev
blackwaterdev@gmail.com

How can I run a query based on a table name and get the column names and
data types returned?

Thanks!

#2Joshua D. Drake
jd@commandprompt.com
In reply to: blackwater dev (#1)
Re: query on table name to return columns and data types?

On Fri, 2006-12-15 at 12:26 -0500, blackwater dev wrote:

How can I run a query based on a table name and get the column names
and data types returned?

Usually your language API will give you what you need for that.

Sincerely,

Joshua D. Drake

Thanks!

--

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/

Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate

#3Erik Jones
erik@myemma.com
In reply to: blackwater dev (#1)
Re: query on table name to return columns and data types?

blackwater dev wrote:

How can I run a query based on a table name and get the column names
and data types returned?

Thanks!

Check out the columns view in the information_schema.

--
erik jones <erik@myemma.com>
software development
emma(r)