Обсуждение: how to invoke edtor?

Поиск
Список
Период
Сортировка

how to invoke edtor?

От
Jagadeesh
Дата:
HI,

how can I invoke editor like vim from postgres? This helps me in
editing large and complex queries.
Thanks

Re: how to invoke edtor?

От
Jagadeesh
Дата:
On Oct 10, 9:42 am, Jagadeesh <mnjagade...@gmail.com> wrote:
> HI,
>
> 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.

Thanks

Re: how to invoke edtor?

От
Guillaume Lelarge
Дата:
Jagadeesh a écrit :
> On Oct 10, 9:42 am, Jagadeesh <mnjagade...@gmail.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

Re: how to invoke edtor?

От
Alvaro Herrera
Дата:
Jagadeesh escribió:
> HI,
>
> how can I invoke editor like vim from postgres? This helps me in
> editing large and complex queries.

Use \e, and make sure EDITOR is set to the editor of your preference.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

Re: how to invoke edtor?

От
Jagadeesh
Дата:
On Oct 10, 7:40 pm, alvhe...@commandprompt.com (Alvaro Herrera) wrote:
> Jagadeesh escribió:
>
> > HI,
>
> > how can I invoke editor like vim from postgres? This helps me in
> > editing large and complex queries.
>
> Use \e, and make sure EDITOR is set to the editor of your preference.
>
> --
> Alvaro Herrera                                http://www.CommandPrompt.com/
> The PostgreSQL Company - Command Prompt, Inc.
>
> --
> Sent via pgsql-admin mailing list (pgsql-ad...@postgresql.org)
> To make changes to your subscription:http://www.postgresql.org/mailpref/pgsql-admin

This helped me a lot. Thanks for all you help.

Thanks
Jagadeesh