
tothpeter08
High Performance PostgreSQL for Rails: reverse search does not work in psql (Page 42)
“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
First Post!

andatki
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!
Popular Pragmatic Bookshelf topics










Other popular topics









Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /rails
- /js
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /java
- /haskell
- /emacs
- /svelte
- /onivim
- /typescript
- /crystal
- /c-plus-plus
- /tailwind
- /kotlin
- /gleam
- /react
- /flutter
- /elm
- /ocaml
- /ash
- /vscode
- /opensuse
- /centos
- /php
- /deepseek
- /html
- /scala
- /zig
- /debian
- /nixos
- /lisp
- /agda
- /sublime-text
- /react-native
- /textmate
- /kubuntu
- /arch-linux
- /revery
- /ubuntu
- /django
- /manjaro
- /spring
- /diversity
- /lua
- /nodejs
- /julia
- /slackware
- /c
- /neovim