Skip to content

Instantly share code, notes, and snippets.

@wesdotcool
Created March 2, 2013 00:35
Show Gist options
  • Save wesdotcool/5069050 to your computer and use it in GitHub Desktop.
Save wesdotcool/5069050 to your computer and use it in GitHub Desktop.
My ~/.psqlrc file
-- This file was constructed from snippets from these websites
-- https://github.com/kylpo/dot-files/blob/master/psqlrc
-- http://www.if-not-true-then-false.com/2009/postgresql-psql-psqlrc-tips-and-tricks/
--
-- See http://www.postgresql.org/docs/8.3/static/app-psql.html for the list of other useful variables
-- extended display mode
-- \x
-- Show nulls explicitly as NULL instead of blank
\pset null 'NULL'
-- Saves the histories specifically in their own DB file
\set HISTFILE ~/.psql_history- :HOST - :DBNAME
-- Save 2000 lines of history instead of the default 500
\set HISTSIZE 2000
\timing
-- reset the prompt to look awesome and use colors
-- \set PROMPT1 '%[%033[31;5m%]%x%[%033[0m%]%[%033[31;1m%]%n%[%033[33;1m%]@%[%033[32;1m%m%[%033[0m%] %[%033[37;1m%]%/%[%033[0m%] %`date +"%H:%M:%S"` %#'
-- \set PROMPT2 '> '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment