Postgres on the command line with an external editor that does not execute the request

When I run \eon the command line while entering the command line tool psql, my default editor, sublime text, is having difficulty opening. However, when I enter the query as follows:

create table tutorials (
  tutorial_id serial primary key,
  title text,

  author_id integer references authors(author_id)

);

Then click save and exit, nothing will happen! My request does not start. What am I doing wrong? How to fix it?

+4
source share
3 answers

I had a similar problem until I added the -w switch to export EDITOR.

From http://www.sublimetext.com/docs/3/osx_command_line.html :

  • Sublime Text , , EDITOR:
  • export EDITOR = 'subl -w'
  • -w , subl , .
+3

\p, , .

+2

, , . (nano), , , . vimrc . , , , . .

0

All Articles