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

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

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

От
Lee Harr
Дата:
In article <3D18A9B7.14B48596@yahoo.com>, Jiaqing Wang wrote:
> 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.
>


There is a flag to psql which will cause it to show the sql
for the backslash commands as you execute them. Check the
man page. I believe it is -E.