select * from pg_tables where tablename='tbl_res';
SELECT attname FROM pg_attribute WHERE attname = 'autoid' and attrelid = 'tbl_version'::regclass;
SELECT conname FROM pg_constraint WHERE conname = 'fk_tbl_ec_info_dev_code' and conrelid = 'tbl_ec_info'::regclass;
select * from pg_indexes where tablename='tbl_operlog' and indexname='idx_tbl_operlog_oper_time_operlog_id';
select * from pg_proc where proname='func_get_id';
select tgrelid::regclass,tgname, (select proname from pg_proc where oid =tgfoid) from pg_trigger where tgname='tri_res_name_2_pinyin';
select * from pg_views where viewname='videorestable';
select * from pg_type where typname='imos_code';
select * FROM information_schema.sequences where sequence_name='seq_tbl_bank_alarm_record_alarm_id';