-
Notifications
You must be signed in to change notification settings - Fork 0
Postgres Psql
Beau Barker edited this page Nov 19, 2025
·
2 revisions
psql is the command-line tool for interacting with your PostgreSQL database.
mkdir -p db/postgres/rcYou can persist your preferences using .psqlrc and .inputrc files.
Create a .psqlrc with your preferred settings:
db/postgres/rc/.psqlrc
\pset pager off
\setenv PAGER 'less -S'
See the psql reference for all available options.
Create .inputrc to set readline behavior:
db/postgres/rc/.inputrc
set editing-mode vi
Add to your compose.override.yaml (this file is for development-only
overriding of compose.yaml):
db/compose.override.yaml
services:
postgres:
volumes:
- ./postgres/rc:/rc:ro
environment:
PSQLRC: /rc/.psqlrc
INPUTRC: /rc/.inputrcdocker compose up -d --force-recreate postgres