%/はデータベース名
PostgreSQLのコマンドラインの動きを改善してみる | Yakst
例
- ~/.psqlrc
\set PROMPT1 '%[%033[1;32m%]%/ %n %`date '+%Y%m%d_%H:%M:%S'` %R%#%[%033[0m%] ' \set PROMPT2 '%[%033[1;32m%]%R%#%[%033[0m%] ' \timing on \set HISTSIZE 1000000 \pset pager off
- 実行例
% psql "host=rs-ra3-4xl-4n.*******.us-east-1.redshift.amazonaws.com user=awsuser dbname=tpch_3tb_skew_distkey port=5439" psql (14.3, server 8.0.2) SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off) Type "help" for help. tpch_3tb_skew_distkey awsuser 20230408_18:08:32 =#