3.7 Useful Shortcuts: \e, \g, \watch, and \timing
Right, let’s talk about the four shortcuts that will save you more cumulative hours than any other feature in psql. These aren’t just commands; they’re workflow accelerants. You’ll wonder how you ever lived without them. The Magical Do-Over: \e You’ve just written a beautiful, complex, four-line query. You hit enter. A typo. Or you realize you need to add a WHERE clause. Your heart sinks. Do you press the up arrow and try to edit this behemoth in the terminal, hoping you don’t accidentally delete a parenthesis and summon a demon? No. You type \e.