diff --git a/work常用/linux/Linux命令.md b/work常用/linux/Linux命令.md index 1dac1e2..ce290e1 100644 --- a/work常用/linux/Linux命令.md +++ b/work常用/linux/Linux命令.md @@ -451,6 +451,11 @@ firewall-cmd --reload | 删除 | dd 删除当前行 | | 方向键 | h:左 j:下 k:上 l:右 | +```shell +# 全局查找替换 +:%s/查找字符串/替换字符串/g +``` + # 六、环境变量 ## 6.1 java 环境变量 ```shell diff --git a/work常用/数据库/Postgresql 常用SQL.md b/work常用/数据库/Postgresql 常用SQL.md index d0e7917..5ac94f5 100644 --- a/work常用/数据库/Postgresql 常用SQL.md +++ b/work常用/数据库/Postgresql 常用SQL.md @@ -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'; ``` ## 二、函数