Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dotfiles
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Chris Coley
dotfiles
Commits
3172ab24
Commit
3172ab24
authored
7 years ago
by
Chris Coley
Browse files
Options
Downloads
Patches
Plain Diff
Adding a .psqlrc file
parent
79389e23
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
install.sh
+6
-0
6 additions, 0 deletions
install.sh
psqlrc
+27
-0
27 additions, 0 deletions
psqlrc
with
33 additions
and
0 deletions
install.sh
+
6
−
0
View file @
3172ab24
...
...
@@ -65,3 +65,9 @@ ln -s $DOTFILES/git-prompt.sh ~/.git-prompt.sh
# PostgreSQL
if
[
-h
~/.psqlrc
]
then
rm
~/.psqlrc
else
mv
~/.psqlrc
{
,.old
}
2> /dev/null
fi
ln
-s
$DOTFILES
/psqlrc ~/.psqlrc
This diff is collapsed.
Click to expand it.
psqlrc
0 → 100644
+
27
−
0
View file @
3172ab24
-- Don't show the contents of this file on psql startup
\set QUIET 1
-- Autocomplete keywords to uppercase
\set COMP_KEYWORD_CASE upper
-- Create a separate history file for each database
\set HISTFILE ~/.psql_history-:DBNAME
-- Ignore duplicate history entries
\set HISTCONTROL ignoredups
-- Force NULL to display as a character instead of empty
\pset null ¤
-- Show how long each query takes to execute
\timing on
-- Use horizontal/vertical column output based on content
\x auto
\unset QUIET
-- Useful aliases
\set version 'SELECT version();'
\set extensions 'SELECT * FROM pg_available_extensions;'
\set whoami 'SELECT CURRENT_USER;'
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment