From: Denis <sqllist@coralindia.com>
To: pgsql-sql@postgresql.org
Subject: Re: Field list from table
Date: Mon, 1 Mar 2004 11:00:49 +0530
Message-ID: <01fb01c3ff4e$5bd62a40$0f32a8c0@denisnew> (raw)
References: <c1kfka$2l33$1@mamut.aster.pl>
To get the list.. use
SELECT a.attname as "Columns"
FROM pg_attribute a, pg_class c
WHERE c.relname = '<YOUR_TABLE_NAME>'
AND a.attnum > 0 AND a.attrelid = c.oid
ORDER BY a.attnum
Thanx
Denis
----- Original Message -----
From: "Jan Pips" <jan_pips@op.pl>
To: <pgsql-sql@postgresql.org>
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
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: sqllist@coralindia.com
Subject: Re: Field list from table
In-Reply-To: <01fb01c3ff4e$5bd62a40$0f32a8c0@denisnew>
* 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