pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mike D'Agosta <mdagosta@earthtribe.net>
To: pgsql-sql@postgresql.org
Subject: Re: Is there anything like DESCRIBE?
Date: Thu, 25 Jan 2001 12:56:17 -0800
Message-ID: <94q48i$5me$1@news.tht.net> (raw)
References: <94n93j$2j6j$1@news.tht.net>

I got a response in email, so I assume the author wants to remain anonymous.
He wrote:

>There's an option to psql (I think -E or -e) that will make it echo all
>the SQL queries it does when you do something like "\d table"

So running a "psql -E <dbname>" and then doing a "\d <table>" will give you
information similar to what you would normally get from a DESCRIBE.

Mike
----------------------------------------------------------------------------
--------------------------
"Mike D'Agosta" <mdagosta@earthtribe.net> wrote in message
news:94n93j$2j6j$1@news.tht.net...
> Hi,
>
>    I have a number of empty tables and I want to get the column names and
> data types with an SQL statement. I want to do this procedurally, not
> interactively (so I can't use \d <tablename> in psql). Postgres doesn't
> support DESCRIBE... is there any other way to do this?
>
> Thanks!
> Mike





view thread (6+ messages)  latest in thread

Message-ID: <94q48i$5me$1@news.tht.net>
Permalink:  ../94q48i$5me$1@news.tht.net/
Also on:    postgresql.org/message-id/94q48i$5me$1@news.tht.net

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: mdagosta@earthtribe.net
  Subject: Re: Is there anything like DESCRIBE?
  In-Reply-To: <94q48i$5me$1@news.tht.net>
  References: <94n93j$2j6j$1@news.tht.net> <94q48i$5me$1@news.tht.net>

* 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