What do I put in ~/.psqlrc
file to set the default editor?
The editor I want to use (Textmate) is at /Users/username/bin/mate
.
I found the place in the docs where they talk about it, and tried several syntax variations, but can't seem to get it to work.
For example, this didn't work...
\set PSQL_EDITOR "/Users/username/bin/mate"
In psql when I enter \e
I get...
sh: /usr/local/bin/mate: No such file or directory
sh: line 0: exec: /usr/local/bin/mate: cannot execute: No such file or directory
/Users/username/bin/mate
is a symbolic link to/usr/local/bin/mate
, which doesn't exist./Users/
OK so it's a Mac I don't recall how to set environment variables on a Mac, but that's what you need to do.