On Sat, Mar 04, 2006 at 12:08:25PM -0500, Tom Lane wrote: > Comments? I generally do not use psql in this manner, because I've found it to be annoying before the change. After the change, from what you describe, I too would find it annoying still.
For me, I prefer the interactive behaviour of ZSH. Multiline statements remain as multiline statements, as they were typed. One can navigate up and down through the multiline statement to make alterations. The real beauty of this approach comes up when doing something such as defining a function. Would you LOVE the ability to edit the function, in the original form, as originally typed, allowing you to insert text, and even newlines into the middle? Effectively you have have a full text editor, for the last complete series of lines. Too hard to implement? :-) To check it out, try /bin/zsh (it seems to come with Linux and Solaris these days), and type out: $ bindkey -e # Emacs key bindings $ f() > { > a > } $ f f:2: command not found: a Oh no. We typed the wrong command in. It isn't 'a' we want. We want 'ls'. Hit up-arrow twice, and we get (_ = cursor) $ f() { a }_ Let's go change 'a'. up arrow, Control-E (end-of-line): $ f() { a_ } Then, backspace, ls: $ f() { ls_ } Then enter: $ _ Done. Saved me lots of time. I write very complex functions, directly with the line editor. If I make a mistake, I go back and change it. Without this sort of thing, I end up storing my functions to a text editor window, and cut + pasting back and forth. In fact, that is what I do with psql today. I have a text editor with a record of all my statements, because psql line editting sucks. Just an opinion. Cheers, mark -- [EMAIL PROTECTED] / [EMAIL PROTECTED] / [EMAIL PROTECTED] __________________________ . . _ ._ . . .__ . . ._. .__ . . . .__ | Neighbourhood Coder |\/| |_| |_| |/ |_ |\/| | |_ | |/ |_ | | | | | | \ | \ |__ . | | .|. |__ |__ | \ |__ | Ottawa, Ontario, Canada One ring to rule them all, one ring to find them, one ring to bring them all and in the darkness bind them... http://mark.mielke.cc/ ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend