Last active
November 13, 2020 13:30
-
-
Save yanmhlv/d929f652e025fcf069ee78f3550e584c to your computer and use it in GitHub Desktop.
coloured PROMPT for psql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\x auto | |
\timing on | |
SET work_mem='512MB'; | |
SET maintenance_work_mem='1GB'; | |
-- Nicer PSQL prompt | |
-- Prompt1 / Prompt2 | |
-- %M : server | |
-- %m : host name | |
-- %> : port | |
-- %n : user | |
-- %/ : current database | |
\set PROMPT1 '%M:%[%033[1;31m%]%>%[%033[0m%] %n@%/%R%#%x ' | |
\set PROMPT2 '%M %n@%/%R %# ' | |
\set HISTFILE ~/.psql_history- :DBNAME | |
\set HISTCONTROL ignoredups | |
\set QUIET OFF | |
\set VERBOSITY verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PSQLRC=~/.psqlrc_prod \ | |
psql | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PSQLRC=~/.psqlrc \ | |
psql | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment