From 8be7b320efea391ded004e8688a44dce048bf9c4 Mon Sep 17 00:00:00 2001 From: old-tom <892955278@msn.cn> Date: Fri, 13 Sep 2024 11:04:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- work常用/linux/Linux命令.md | 5 +++++ work常用/数据库/Postgresql 常用SQL.md | 6 ++++++ 2 files changed, 11 insertions(+) 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'; ``` ## 二、函数