Matching the MYSQL "Describe " command

Поиск
Список
Период
Сортировка
От Alan Chandler
Тема Matching the MYSQL "Describe " command
Дата
Msg-id 200504241902.16770.alan@chandlerfamily.org.uk
обсуждение исходный текст
Ответы Re: Matching the MYSQL "Describe " command  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Re: Matching the MYSQL "Describe " command  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-sql
I am rather new to Postgres (running 7.4) but I am trying to port some PHP 
code that has been built to run with mysql.

I have got stuck trying to find the equivalent of the Mysql "DESCRIBE 
<tablename>;" SQL statement that lists the columns and type identifiers of a 
table.

I think I am going to do a SELECT on the "pg_attribute" table, but I don't 
understand what the "attrelid" column of that table refers to.  I need to get 
the table name of the column so that I can restrict the select with a WHERE 
clause so I assumed it was a key into the pg_class table, but I can't see a 
column in this table that could potentially correspond and therefore I could 
join to it.

Help
-- 
Alan Chandler
http://www.chandlerfamily.org.uk


В списке pgsql-sql по дате отправления:

Предыдущее
От: Alexander Vlasenko
Дата:
Сообщение: unsubscribe
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Matching the MYSQL "Describe " command