SQL statement : list table details

Поиск
Список
Период
Сортировка
От Dino Hoboloney
Тема SQL statement : list table details
Дата
Msg-id a5luq1$17ea$1@jupiter.hub.org
обсуждение исходный текст
Ответы Re: SQL statement : list table details  (Oliver Elphick <olly@lfix.co.uk>)
Список pgsql-general
    I am looking for a SQL statement which would list table names, columns,
and column types of a specific DB. So far I have managed to find a statement
that lists all of the tables and columns in the DB with

SELECT a.attnum, a.attname AS field, c.relname AS table_name FROM pg_class
c, pg_attribute a WHERE c.relname NOT LIKE 'pg%' AND relkind = 'r' AND
a.attnum > 0 AND a.attrelid = c.oid ORDER BY table_name, attnum;

unfortunately I am unable to come up with a solution to listing the data
types for the columns listed. Any ideas?



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

Предыдущее
От: "paul simdars"
Дата:
Сообщение: pg documentation
Следующее
От: "Gtrica"
Дата:
Сообщение: libcrypt.so.2