Re: Notice about psql !

Поиск
Список
Период
Сортировка
Искать
От
Bruce Momjian
Тема
Re: Notice about psql !
Дата
Msg-id
20131218025842.GB6509@momjian.us
Ответ на
Список
Дерево обсуждения
Notice about psql ! "Doom.zhou" <zzepaigh@gmail.com>
Re: Notice about psql ! Steve Crawford <scrawford@pinpointresearch.com>
Re: Notice about psql ! David Johnston <polobo@yahoo.com>
Re: Notice about psql ! "Doom.zhou" <zzepaigh@gmail.com>
Re: Notice about psql ! Bruce Momjian <bruce@momjian.us>
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. +

В списке pgsql-admin по дате отправления
От: Doom.zhou
Дата:
Сообщение: Re: Notice about psql !
От: Doom.zhou
Дата:
FAQ