Re: Not so happy with psql's new multiline behavior

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Not so happy with psql's new multiline behavior
Дата
Msg-id 200603050457.k254vlj25140@candle.pha.pa.us
обсуждение исходный текст
Ответ на Not so happy with psql's new multiline behavior  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Just to clarify, is this the problem?
test=> SELECTtest-> \dNo relations found.test-> 1; ?column?----------        1(1 row)test=> SELECT\d1;Did not find any
relationnamed "1".
 
I do like the new behavior and rarely do backslashes while I am typing a
multi-line statements.  I suppose we could supress backslashes from
being added to history when you are in the middle of a multi-line query.

---------------------------------------------------------------------------

Tom Lane wrote:
> Has anyone else been finding the recent behavior of CVS-tip psql
> to be a disimprovement?  I've gotten sufficiently annoyed with it
> that I'm ready to propose reverting this patch:
> 
> 2006-02-11 16:55  momjian
> 
>     * src/bin/psql/: help.c, input.c, input.h, mainloop.c, prompt.c,
>     tab-complete.c: o Improve psql's handling of multi-line statements
>     
>         Currently, while \e saves a single statement as one entry,
>     interactive
>         statements are saved one line at a time.  Ideally all
>     statements
>         would be saved like \e does.
>     
>     Sergey E. Koposov
> 
> 
> Maybe it's just that I'm too used to the old behavior, but I don't like
> anything about the way it works now.  As an example, the new behavior is
> extremely unfriendly to backslash commands.  I just got done typing a
> long command and then deciding that I would like to have \timing on, so
> I hit return (which in prior versions would have entered the line into
> the history buffer), typed \timing, hit return again, hit control-P, and
> found that I'd lost my long command.  In other situations I find that
> control-P pulls back weird combinations of SQL and backslash commands,
> and there's no way AFAICT to separate the two.
> 
> At a minimum this code has to be fixed to understand the difference
> between backslash commands and SQL lines, and not combine them in
> history entries; otherwise we should revert it.  I'm leaning to "revert"
> since I haven't actually seen a case where pulling back multiple lines
> helped me ... but maybe that just reflects that I don't retype multiline
> SQL commands all that much.
> 
> Comments?
> 
>             regards, tom lane
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
> 

--  Bruce Momjian   http://candle.pha.pa.us SRA OSS, Inc.   http://www.sraoss.com
 + If your life is a hard drive, Christ can be your backup. +


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Building Windows Server Extensions Using VC++ 2005
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Copyright