X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 3BDADD1E949 for ; Mon, 1 Mar 2004 05:35:40 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 90834-06 for ; Mon, 1 Mar 2004 01:35:27 -0400 (AST) Received: from cyber12.e-insites.com (ns10.nic-reg-dns.com [66.206.10.2]) by svr1.postgresql.org (Postfix) with ESMTP id 96667D1BB15 for ; Mon, 1 Mar 2004 01:35:25 -0400 (AST) Received: from server2k ([61.11.69.241]) by cyber12.e-insites.com with MailEnable ESMTP; Sun, 29 Feb 2004 21:39:43 -0800 Received: from 192.168.50.15 by server2k ([192.168.50.102] running VPOP3) with SMTP; Mon, 1 Mar 2004 11:12:17 +0530 X-MSReally-From: sqllist@coralindia.com Message-ID: <01fb01c3ff4e$5bd62a40$0f32a8c0@denisnew> From: "Denis" To: References: Subject: Re: Field list from table Date: Mon, 1 Mar 2004 11:00:49 +0530 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Server: VPOP3 V1.5.0 - Registered X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=2.2 tagged_above=0.0 required=5.0 tests=BAYES_01, RCVD_IN_DSBL, RCVD_IN_NJABL, RCVD_IN_NJABL_PROXY, RCVD_IN_SORBS, RCVD_IN_SORBS_HTTP, RCVD_IN_SORBS_SOCKS X-Spam-Level: ** X-Archive-Number: 200403/2 X-Sequence-Number: 17101 To get the list.. use SELECT a.attname as "Columns" FROM pg_attribute a, pg_class c WHERE c.relname = '' AND a.attnum > 0 AND a.attrelid = c.oid ORDER BY a.attnum Thanx Denis ----- Original Message ----- From: "Jan Pips" To: Sent: Thursday, February 26, 2004 3:21 PM Subject: [SQL] Field list from table > How can I, using SELECT, get the full list of fields from a given table? > > Pips > > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly