GaussDB命令行显示设置
GaussDB命令行显示设置
vi ~/gauss_env_file export PSQLRC=/home/omm/.gsqlrc vi /home/omm/.gsqlrc \set PROMPT1 '%`date +%H:%M:%S` %n@%/ > ' \timing on
效果如下:
[omm@gaussdb ~]$ gsql -Uroot -W xxxxxxxxxx -d postgres -p 8000 -ar \set PROMPT1 '%`date +%H:%M:%S` %n@%/ > ' \timing on Timing is on. gsql ((GaussDB Kernel 503.1.0.SPC2000 build 15786b02) compiled at 2023-12-12 22:07:15 commit 5868 last mr 14483 release) Non-SSL connection (SSL connection is recommended when requiring high-security) Type "help" for help. 09:56:53 root@postgres > select current_database(); current_database ------------------ postgres (1 row) Time: 1.938 ms 09:57:00 root@postgres > select current_user; current_user -------------- root (1 row) Time: 1.622 ms 09:57:02 root@postgres >
其他设置:
\set PROMPT1 '%`date +%H:%M:%S` (%n@%M:%>)%/%R%#%x ' \set PROMPT1 '%[%033[1;33;40m%]%`date +%H:%M:%S` %n@%/ > '
参考链接:
https://www.27ka.cn/299252.html
https://www.modb.pro/db/569888
https://support.huawei.com/enterprise/zh/doc/EDOC1100296314?section=k005
分类:
GaussDB
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
2021-03-11 Linux双网卡绑定启动网卡报错Error: Connection activation failed: Master connection not found or invalid