Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
qd011
· 3y ago · 0 comments
psql is good but how do you manage long multi line queries and saved collections of queries to reuse? or connections to multiple databases?
Comments
[–]
efxhoy
3y ago
I keep queries in .sql files in git repo. I run longer queries by writing them in a file and including/running it with \i. There's also \e to open $PSQL_EDITOR.