From: | "Brian C(dot) Doyle" <bcdoyle(at)mindspring(dot)com> |
---|---|
To: | Ingo Jung <Ingo(dot)Jung(at)syscom-work(dot)de> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: AW: Table Attribute Help |
Date: | 2000-10-09 15:38:18 |
Message-ID: | 5.0.0.25.2.20001009113629.0524b2c0@pop.mindspring.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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(at)mindspring(dot)com]
>Gesendet: Montag, 9. Oktober 2000 17:21
>An: pgsql-sql(at)postgresql(dot)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?
From | Date | Subject | |
---|---|---|---|
Next Message | omid omoomi | 2000-10-09 15:47:02 | Re: Table Attribute Help |
Previous Message | Jeff Hoffmann | 2000-10-09 15:33:47 | Re: Table Attribute Help |