Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vt7LV-0002IX-2M for pgsql-admin@arkaria.postgresql.org; Wed, 18 Dec 2013 02:58:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vt7LU-0005HL-Gb for pgsql-admin@arkaria.postgresql.org; Wed, 18 Dec 2013 02:58:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vt7LT-0005HE-FU for pgsql-admin@postgresql.org; Wed, 18 Dec 2013 02:58:47 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vt7LQ-0005Re-L2 for pgsql-admin@postgresql.org; Wed, 18 Dec 2013 02:58:46 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1Vt7LO-000559-2W; Tue, 17 Dec 2013 21:58:42 -0500 Date: Tue, 17 Dec 2013 21:58:42 -0500 From: Bruce Momjian To: "Doom.zhou" Cc: David Johnston , pgsql-admin@postgresql.org Subject: Re: Notice about psql ! Message-ID: <20131218025842.GB6509@momjian.us> References: <52B063DF.2020508@pinpointresearch.com> <1387292662322-5783726.post@n5.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -2.4 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org On Wed, Dec 18, 2013 at 10:35:33AM +0800, Doom.zhou wrote: > Really thanks  > > > On Tue, Dec 17, 2013 at 11:04 PM, David Johnston wrote: > > Steve Crawford wrote > > On 12/16/2013 09:29 PM, Doom.zhou wrote: > >> HI guys > >>     when edit some sql in psql's \e feature then quit edit > >> it is performed !!!! > >> > >> > >> it's dangerous isn't it ? > >> > > It is *extremely* dangerous. But neither more nor less dangerous than > > any interface that allows you to submit SQL directly to the server. > > > > The \e command merely offers an alternative to the command-line editing > > to craft your SQL statements and is very convenient when you are editing > > a long statement. When done, you exit and the command is submitted just > > as it is submitted when you press > > > >  at the command-line. > > > > If you change your mind while in the editor, just clear the text in the > > editor and exit. Nothing will be run. > > Or > > BEGIN; > > \e > > COMMIT | ROLLBACK ; Actually, just remove the semicolon from the query and it will not run when you exit \e. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin