Re: how to invoke edtor?

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Jagadeesh <mnjagadeesh(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: how to invoke edtor?
Date: 2008-10-10 09:07:40
Message-ID: 48EF1B5C.4010103@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Jagadeesh a écrit :
> On Oct 10, 9:42 am, Jagadeesh <mnjagade(dot)(dot)(dot)(at)gmail(dot)com> wrote:
>>[...]
>> how can I invoke editor like vim from postgres? This helps me in
>> editing large and complex queries.
>> Thanks
>
> I just got to know emacs can be used for it. Is there any other
> method?
> I am using FreeBSD.
>

Change the EDITOR environment variable.

export EDITOR=vim

and psql will use vim as the query editor with \e metacommand.

--
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Julius Tuskenis 2008-10-10 09:15:29 Re: can I update multiple table at a time?
Previous Message Jagadeesh 2008-10-10 07:57:25 Re: logging SQL statements