From mahelope@pereira.multi.net.co Sat Jul 28 12:57:18 2001 Received: from obregon.multi.net.co (obregon.multi.net.co [200.30.42.18]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f6SCvHf45361 for ; Sat, 28 Jul 2001 08:57:18 -0400 (EDT) (envelope-from mahelope@pereira.multi.net.co) Received: from hector2 (206.49.164.130) by obregon.multi.net.co (5.1.039) id 3B133A550015DA56 for pgsql-sql@postgresql.org; Sat, 28 Jul 2001 07:56:39 +0500 Message-ID: <000001c11765$91adb260$82a431ce@hector2> From: =?iso-8859-1?Q?Mar=EDa_Elena_Hern=E1ndez?= To: Subject: Get name of columns in a table Date: Fri, 27 Jul 2001 20:36:35 -0500 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_002E_01C116DB.D45873A0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 Disposition-Notification-To: =?iso-8859-1?Q?Mar=EDa_Elena_Hern=E1ndez?= X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Archive-Number: 200107/369 X-Sequence-Number: 4183 This is a multi-part message in MIME format. ------=_NextPart_000_002E_01C116DB.D45873A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi everybody! =20 Is it possible to get thecoluns names of an a table in the database with a= sql query?? =20 Thanks, a lot..... e-mail mariae@acmecity.com mahelope@calvin.univalle.edu.co ------=_NextPart_000_002E_01C116DB.D45873A0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
&n= bsp;Hi=20 everybody!
 
Is it possible to get thecoluns names of an a= =20 table in the database with a sql
query??
 

Thanks, a lot.....


<= /DIV>
e-mail
mariae@acmecity.com
mahelope@calvin.univalle.ed= u.co
------=_NextPart_000_002E_01C116DB.D45873A0-- From jburton@scw.org Sat Jul 28 14:31:38 2001 Received: from olympus.scw.org (209-9-156-98.sdsl.cais.net [209.9.156.98]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f6SEVcf80520; Sat, 28 Jul 2001 10:31:38 -0400 (EDT) (envelope-from jburton@scw.org) Received: from localhost (joel@localhost) by olympus.scw.org (8.10.1/8.10.1) with ESMTP id f6SEVWs28446; Sat, 28 Jul 2001 10:31:32 -0400 X-Authentication-Warning: olympus.scw.org: joel owned process doing -bs Date: Sat, 28 Jul 2001 10:31:32 -0400 (EDT) From: Joel Burton X-Sender: joel@olympus.scw.org To: =?iso-8859-1?Q?Mar=EDa_Elena_Hern=E1ndez?= cc: pgsql-sql@postgresql.org, pgsql-novice@postgresql.org Subject: Re: Get name of columns in a table In-Reply-To: <000001c11765$91adb260$82a431ce@hector2> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by postgresql.org id f6SEVdg80521 X-Archive-Number: 200107/106 X-Sequence-Number: 1781 On Fri, 27 Jul 2001, [iso-8859-1] María Elena Hernández wrote: > Is it possible to get thecoluns names of an a table in the database with a sql > query?? "psql -E" will show the SQL commands that psql internally uses to display tables, database, etc. Once in psql, use "\d table_name" to see fields in a table and the SQL behind that. -- Joel Burton Director of Information Systems, Support Center of Washington From dev@archonet.com Tue Jul 31 15:03:29 2001 Received: from finch-post-10.mail.demon.net (finch-post-10.mail.demon.net [194.217.242.38]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f6VF3Tf88086 for ; Tue, 31 Jul 2001 11:03:29 -0400 (EDT) (envelope-from dev@archonet.com) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by finch-post-10.mail.demon.net with esmtp (Exim 2.12 #1) id 15Rb3M-000MGW-0A; Tue, 31 Jul 2001 15:03:25 +0000 Received: from archonet.com (ibook.archonet.com [192.168.1.32]) by mainbox.archonet.com (Postfix) with ESMTP id 34B5C130C4; Tue, 31 Jul 2001 15:56:42 +0100 (BST) Message-ID: <3B66C697.FF4EC81B@archonet.com> Date: Tue, 31 Jul 2001 15:54:15 +0100 From: Richard Huxton X-Mailer: Mozilla 4.7C-CCK-MCD {C-UDP; EBM-APPLE} (Macintosh; I; PPC) X-Accept-Language: en MIME-Version: 1.0 To: =?iso-8859-1?Q?Mar=EDa?= Elena =?iso-8859-1?Q?Hern=E1ndez?= Cc: pgsql-sql@postgresql.org Subject: Re: Get name of columns in a table References: <000001c11765$91adb260$82a431ce@hector2> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Archive-Number: 200107/389 X-Sequence-Number: 4203 María Elena Hernández wrote: > To get a list of columns, run "psql -E" and do a standard "\df foo" where foo is your table name. This will show you exactly how PG does it. I've found this very useful with all the backslash commands. HTH - Richard Huxton