查询标识

comment on table us_lex is '别名测试1';

comment on column us_lex.id is '唯一标识';

comment on column us_lex.is_custom is '是否消费';
comment on column us_lex.lishanyang01 is '李山羊1';
comment on column us_lex.lishanyang02 is '李山羊2';
comment on column us_lex.lishanyang03 is '李山羊3';

select description from pg_description join pg_class on pg_description.objoid = pg_class.oid where relname = 'us_lex';

select * from pg_description join pg_class on pg_description.objoid = pg_class.oid where relname = 'us_lex';

SELECT * from pg_class where relname = 'us_lex';
SELECT * from pg_description where relname = 'us_lex';

SELECT *
FROM pg_catalog.pg_tables
WHERE schemaname != 'pg_catalog' AND schemaname != 'information_schema';


SELECT *
FROM pg_catalog.pg_tables
WHERE schemaname = 'pg_catalog';


SELECT
    table_schema,
    table_name,
    column_name,
    data_type,
    is_nullable,
    column_default
FROM
    information_schema.columns
        where  "table_name" = 'us_lex';
ORDER BY
    table_schema,
    table_name,
    ordinal_position;
        
SELECT
*
FROM
    information_schema.columns
        where  "table_name" = 'us_lex';
ORDER BY
    table_schema,
    table_name,
    ordinal_position;

 

posted @ 2024-05-23 12:05  羊大葱  阅读(31)  评论(0编辑  收藏  举报