From: Brian C. Doyle <bcdoyle@mindspring.com>
To: Ingo Jung <Ingo.Jung@syscom-work.de>
Cc: pgsql-sql@postgresql.org
Subject: Re: AW: Table Attribute Help
Date: Mon, 09 Oct 2000 11:38:18 -0400
Message-ID: <5.0.0.25.2.20001009113629.0524b2c0@pop.mindspring.com> (raw)
In-Reply-To: <AE3E1F3B7A2AD311A60500A0C9F2CC4B3967BE@kom.vlk.com>
That is great thank you.
How would I grab the attribute type for an attribute with it so that the
out put would look like
attname atttype
-------------- ----------
userid varchar(30)
I know that is not correct but is it possible to get that out put
At 05:27 PM 10/9/00 +0200, you wrote:
>yes it's possible,
>
>SELECT pg_attribute.attname
>FROM pg_class, pg_attribute
>WHERE
>pg_class.relname = 'xxx' and pg_attribute.attrelid = pg_class.oid
>
>and pg_attribute.attnum>=1 order by pg_attribute.attnum;
>
>xxx is your tablename!
>
>
>-----Ursprüngliche Nachricht-----
>Von: Brian C. Doyle [mailto:bcdoyle@mindspring.com]
>Gesendet: Montag, 9. Oktober 2000 17:21
>An: pgsql-sql@postgresql.org
>Betreff: [SQL] Table Attribute Help
>
>
>Hello all,
>
>I am trying to find a query to retrive the attributes of a table as in \d
>tablename but as a select command. Is this possible?
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: bcdoyle@mindspring.com, Ingo.Jung@syscom-work.de
Subject: Re: Table Attribute Help
In-Reply-To: <5.0.0.25.2.20001009113629.0524b2c0@pop.mindspring.com>
References: <AE3E1F3B7A2AD311A60500A0C9F2CC4B3967BE@kom.vlk.com> <5.0.0.25.2.20001009113629.0524b2c0@pop.mindspring.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox