Received: from tisch.mail.mindspring.net (tisch.mail.mindspring.net [207.69.200.157]) by hub.org (8.10.1/8.10.1) with ESMTP id e99FdJJ56522 for ; Mon, 9 Oct 2000 11:39:19 -0400 (EDT) Received: from hbg-dnt-1467.mindspring.com (fw-6-e3.atl2.mindspring.net [207.69.162.124]) by tisch.mail.mindspring.net (8.9.3/8.8.5) with ESMTP id LAA19262; Mon, 9 Oct 2000 11:39:16 -0400 (EDT) Message-Id: <5.0.0.25.2.20001009113629.0524b2c0@pop.mindspring.com> X-Sender: bcdoyle@pop.mindspring.com X-Mailer: QUALCOMM Windows Eudora Version 5.0 Date: Mon, 09 Oct 2000 11:38:18 -0400 To: Ingo Jung From: "Brian C. Doyle" Subject: Re: AW: Table Attribute Help Cc: pgsql-sql@postgresql.org In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.org id e99FdJJ56523 X-Archive-Number: 200010/84 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?