Re: Is there anything like DESCRIBE? - Mailing list pgsql-sql

From Mike D'Agosta
Subject Re: Is there anything like DESCRIBE?
Date
Msg-id 94q48i$5me$1@news.tht.net
Whole thread Raw
In response to Is there anything like DESCRIBE?  ("Mike D'Agosta" <mdagosta@earthtribe.net>)
List pgsql-sql
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




pgsql-sql by date:

Previous
From: "Mark A. Summers"
Date:
Subject: SQL Help
Next
From: "Brett W. McCoy"
Date:
Subject: Re: Wild Cards