Re: Notice about psql ! - Mailing list pgsql-admin

From David Johnston
Subject Re: Notice about psql !
Date
Msg-id 1387292662322-5783726.post@n5.nabble.com
Whole thread Raw
In response to Re: Notice about psql !  (Steve Crawford <scrawford@pinpointresearch.com>)
Responses Re: Notice about psql !  ("Doom.zhou" <zzepaigh@gmail.com>)
List pgsql-admin
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>

David J.







--
View this message in context: http://postgresql.1045698.n5.nabble.com/Notice-about-psql-tp5783659p5783726.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


pgsql-admin by date:

Previous
From: Steve Crawford
Date:
Subject: Re: Notice about psql !
Next
From: dx k9
Date:
Subject: shmmax 9.3