|
|
|
@ -19,6 +19,12 @@ select relname, pg_size_pretty(pg_relation_size(relid)) as size from pg_stat_
|
|
|
|
|
select * from pg_locks where granted='f'
|
|
|
|
|
8.结束死锁进程
|
|
|
|
|
select pg_terminate_backend(pid) from (select pid from pg_locks where granted='f')
|
|
|
|
|
9.查看表结构
|
|
|
|
|
SELECT
|
|
|
|
|
a.attname as column_name,
|
|
|
|
|
format_type(a.atttypid,a.atttypmod) as data_type,
|
|
|
|
|
col_description(a.attrelid,a.attnum) as comment
|
|
|
|
|
FROM pg_class as c,pg_attribute as a where a.attrelid = c.oid and a.attnum>0 and c.relname = 'Edge_0101';
|
|
|
|
|
```
|
|
|
|
|
## 二、函数
|
|
|
|
|
|
|
|
|
|