Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 8FF2D37C1C9 for ; Fri, 10 Oct 2008 06:07:59 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 48887-02 for ; Fri, 10 Oct 2008 06:07:46 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sd-2317.dedibox.fr (sd-2317.dedibox.fr [88.191.17.192]) by postgresql.org (Postfix) with ESMTP id 9764A37BADD for ; Fri, 10 Oct 2008 06:07:45 -0300 (ADT) Received: from [192.168.10.64] (ASte-Genev-Bois-153-1-7-40.w83-112.abo.wanadoo.fr [83.112.69.40]) by sd-2317.dedibox.fr (Postfix) with ESMTP id 31CBD27D3; Fri, 10 Oct 2008 11:07:41 +0200 (CEST) Message-ID: <48EF1B5C.4010103@lelarge.info> Date: Fri, 10 Oct 2008 11:07:40 +0200 From: Guillaume Lelarge User-Agent: Thunderbird 2.0.0.17 (X11/20080925) MIME-Version: 1.0 To: Jagadeesh CC: pgsql-admin@postgresql.org Subject: Re: how to invoke edtor? References: <58515b7e-0ffc-4638-922e-dbf789f6d58e@w24g2000prd.googlegroups.com> In-Reply-To: <58515b7e-0ffc-4638-922e-dbf789f6d58e@w24g2000prd.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.693 tagged_above=0 required=5 tests=RCVD_IN_NJABL_PROXY=1.693 X-Spam-Level: * X-Archive-Number: 200810/80 X-Sequence-Number: 30536 Jagadeesh a écrit : > On Oct 10, 9:42 am, Jagadeesh 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