To get the column names, data types, and nullables of tables in the schema owned by MASTER_USER

Поиск
Список
Период
Сортировка
От Eugene Yin
Тема To get the column names, data types, and nullables of tables in the schema owned by MASTER_USER
Дата
Msg-id 751099510.1801394.1452198146367.JavaMail.yahoo@mail.yahoo.com
обсуждение исходный текст
Ответы Re: To get the column names, data types, and nullables of tables in the schema owned by MASTER_USER
Список pgsql-sql
PostgreSQL ver: 9.4.5         OS: Linux
GOAL: To get the column names, data types, and nullables of tables in the schema owned by MASTER_USER
In Oracle, I can use the following statement:
select    t.table_name,   t.column_name,   t.data_type,   t.NULLABLE,   (SELECT col.column_name    FROM all_constraints cons, all_cons_columns col    WHERE col.table_name = t.table_name                       AND cons.constraint_type = 'P'                       AND cons.constraint_name = col.constraint_name                       AND cons.owner = col.owner and cons.owner = 'MASTER_USER'   )  Primary_Key_Column
from user_tab_columns t;
Now, I am on Postgres (9.4.5). How can I convert the above statement into the equivalent SQL  on Postgres?

Thanks
Eugene

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