@andatki
“If you’ve used the history command in your terminal, psql supports a similar “reverse search” by typing “ctrl-r”. Type ctrl-r, then SEL to match any SELECT statements you’ve run before.”
→ It doesn’t work for me on OSX. This solved it: postgresql - Is there a psql equivalent of bash's reverse-search-history? - Database Administrators Stack Exchange
1 Like
Good catch. Sure enough, I had that file set and didn’t realize that it was the source of that functionality and not built-in to psql.
Here are the contents of my ~/.editrc
file:
bind "^R" em-inc-search-prev
This is part of my dotfiles: https://github.com/andyatkinson/dotfiles
With this file present, then reverse search works within psql as described. I’ll add something about this to the Rideshare repository for others. Thanks for reporting it!