pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Get name of columns in a table
3+ messages / 3 participants
[nested] [flat]

* Get name of columns in a table
@ 2001-07-28 01:36  María Elena Hernández <mahelope@pereira.multi.net.co>
  0 siblings, 2 replies; 3+ messages in thread

From: María Elena Hernández @ 2001-07-28 01:36 UTC (permalink / raw)
  To: pgsql-sql

 Hi everybody!
 
 Is it possible to get thecoluns names of an a table in the database with a sql
query??
 
Thanks, a lot.....


e-mail
mariae@acmecity.com
mahelope@calvin.univalle.edu.co

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Get name of columns in a table
@ 2001-07-28 14:31  Joel Burton <jburton@scw.org>
  parent: María Elena Hernández <mahelope@pereira.multi.net.co>
  1 sibling, 0 replies; 3+ messages in thread

From: Joel Burton @ 2001-07-28 14:31 UTC (permalink / raw)
  To: María Elena Hernández <mahelope@pereira.multi.net.co>; +Cc: pgsql-sql; pgsql-novice@postgresql.org

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   <jburton@scw.org>
Director of Information Systems, Support Center of Washington




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Get name of columns in a table
@ 2001-07-31 14:54  Richard Huxton <dev@archonet.com>
  parent: María Elena Hernández <mahelope@pereira.multi.net.co>
  1 sibling, 0 replies; 3+ messages in thread

From: Richard Huxton @ 2001-07-31 14:54 UTC (permalink / raw)
  To: María Elena Hernández <mahelope@pereira.multi.net.co>; +Cc: pgsql-sql

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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2001-07-31 14:54 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-07-28 01:36 Get name of columns in a table María Elena Hernández <mahelope@pereira.multi.net.co>
2001-07-28 14:31 ` Joel Burton <jburton@scw.org>
2001-07-31 14:54 ` Richard Huxton <dev@archonet.com>

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