pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Doom.zhou <zzepaigh@gmail.com>
Cc: David Johnston <polobo@yahoo.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Notice about psql !
Date: Tue, 17 Dec 2013 21:58:42 -0500
Message-ID: <20131218025842.GB6509@momjian.us> (raw)
In-Reply-To: <CAK=muZscSxxMZTUUiXnBUkHRk9HE4niyzGLLMrky=sOkWu1wBg@mail.gmail.com>
References: <CAK=muZtrjsYnXMsqq84bMf5gLY1ytcCjw4ORu48pD0m-bvpMrA@mail.gmail.com>
	<52B063DF.2020508@pinpointresearch.com>
	<1387292662322-5783726.post@n5.nabble.com>
	<CAK=muZscSxxMZTUUiXnBUkHRk9HE4niyzGLLMrky=sOkWu1wBg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

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 <polobo@yahoo.com> 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
>     > <Enter>
>     >  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; <Enter>
> 
>     \e <Enter>
> 
>     COMMIT | ROLLBACK ; <Enter>

Actually, just remove the semicolon from the query and it will not run
when you exit \e.

-- 
  Bruce Momjian  <bruce@momjian.us>        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



view thread (5+ messages)

Message-ID: <20131218025842.GB6509@momjian.us>
Permalink:  ../20131218025842.GB6509@momjian.us/
Also on:    postgresql.org/message-id/20131218025842.GB6509@momjian.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: bruce@momjian.us, zzepaigh@gmail.com, polobo@yahoo.com
  Subject: Re: Notice about psql !
  In-Reply-To: <20131218025842.GB6509@momjian.us>
  References: <CAK=muZtrjsYnXMsqq84bMf5gLY1ytcCjw4ORu48pD0m-bvpMrA@mail.gmail.com> <52B063DF.2020508@pinpointresearch.com> <1387292662322-5783726.post@n5.nabble.com> <CAK=muZscSxxMZTUUiXnBUkHRk9HE4niyzGLLMrky=sOkWu1wBg@mail.gmail.com> <20131218025842.GB6509@momjian.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox