Обсуждение: How can I describe a table with select * ...

Поиск
Список
Период
Сортировка

How can I describe a table with select * ...

От
Jiaqing Wang
Дата:
Hi,
I'm fairly new here, and new to PostgreSQL, I recently run into a
problem. As you all know that you can do "\d table_name" to describe a
table in psql. However, I need to get the same result via regular SQL
query which can be sent to server via many client interface. I know
these info must be stored somewhere in the system tables but seem to
have failed to put together the whole picture, can anyone help? any
direction would be greatly appreciated.

JJW
6/25/2002


Re: How can I describe a table with select * ...

От
Alvaro Herrera
Дата:
Jiaqing Wang dijo:

> Hi,
> I'm fairly new here, and new to PostgreSQL, I recently run into a
> problem. As you all know that you can do "\d table_name" to describe a
> table in psql. However, I need to get the same result via regular SQL
> query which can be sent to server via many client interface. I know
> these info must be stored somewhere in the system tables but seem to
> have failed to put together the whole picture, can anyone help? any
> direction would be greatly appreciated.

Try psql -E. I will show you the queries psql is doing behind your back.

--
Alvaro Herrera (<alvherre[a]atentus.com>)
"La verdad no siempre es bonita, pero el hambre de ella si"