Postgresql (psql) .psqlrc技巧和窍门
来源:互联网 发布:gta5 知乎 编辑:程序博客网 时间:2024/05/24 22:42
Set all null fields to NULL:
After this, the query results look like this:
select 'test' as test_text, null as test_null; test_text | test_null-----------+----------- test | NULL(1 row)
Set the command history file names for each host and database:
After this, the history file naming look like this:
.psql_history-alpha-testdb.psql_history-localhost-test.psql_history-10.20.10.101-production...
Set the number of commands to store in the command history:
Set timing on and see how long query took:
psql prompt can be customized to your preference:
After this, the PROMPT1 look like this:
(wwwuser@alpha:5432) [webdb] >
And PROMPT2 is empty.
Complete information can be found here, under prompting.
Set client encoding:
Final .psqlrc file look like this:
One additional tip is to add less to PAGER environment variable if you want to use less rather than more. So simply add following row to profile (/etc/profile or ~/.profile):
- Postgresql (psql) .psqlrc技巧和窍门
- PostgreSQL学习第八篇--psql的使用技巧和注意事项
- PowerBuilder技巧和窍门
- PowerBuilder技巧和窍门
- git - 技巧和窍门
- PowerBuilder 技巧和窍门
- postgresql命令行(psql)
- postgresql常用命令psql
- 【psql】PostgreSQL常用指令
- PostgreSQL psql 终端命令
- Android Studio技巧和窍门
- Git 基础 - 技巧和窍门
- 渗透测试技巧和窍门
- PostgreSQL:psql工具的使用
- postgresql学习--psql命令行常用命令
- 【PostgreSQL-9.6.3】psql常用命令
- PostgreSQL客户端交互命令psql
- 【PostgreSQL】PostgreSQL操作-psql基本命令
- 使用svn开发,目录的约定与开发流程
- JSP脚本的9个内置对象(一)——简述、Application对象
- 经典网文:ELF映像的装入
- 消息中间件及WebSphere MQ入门
- C++中的公有继承(public)问题
- Postgresql (psql) .psqlrc技巧和窍门
- android的main.xml和标签
- Boost学习指南之:正则表达式
- 不同服务器上 实现mysql数据表迁移
- Linux下架设L2TP IPSec VPN服务器(X509)
- 《C语言•程序结构教学模拟软件》功能介绍
- 向 appstore 查询已发布 APP 的信息
- 资源管理——防止资源泄漏
- 背包问题介绍