Re: Is there anything like DESCRIBE?

Поиск
Список
Период
Сортировка
От Mike D'Agosta
Тема Re: Is there anything like DESCRIBE?
Дата
Msg-id 94q48i$5me$1@news.tht.net
обсуждение исходный текст
Ответ на Is there anything like DESCRIBE?  ("Mike D'Agosta" <mdagosta@earthtribe.net>)
Список 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 по дате отправления:

Предыдущее
От: "Mark A. Summers"
Дата:
Сообщение: SQL Help
Следующее
От: "Brett W. McCoy"
Дата:
Сообщение: Re: Wild Cards