From: | "Michael Paesold" <mpaesold(at)gmx(dot)at> |
---|---|
To: | <mark(at)mark(dot)mielke(dot)cc>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Re: Not so happy with psql's new multiline behavior |
Date: | 2006-03-04 18:42:29 |
Message-ID: | 002e01c63fbb$64e8cb10$67dc8380@zaphod |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> 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.
Reverting or not, this is rather a matter of how annoying it is right now
(for the developers using CVS tip). I think the old behaviour needs
improvement. You could either use \e and have nice editing capabilities, but
have no tab completition, no backslash-commands in between, and your nice
multiple-lines-query fell apart as soon as you exited psql.
I have not tried CVS tip for a while, but what you describe needs fixing.
Backslash-commands should definately work.
Mark <mark(at)mark(dot)mielke(dot)cc> wrote:
> To check it out, try /bin/zsh (it seems to come with Linux and
> Solaris these days), and type out:
Actually I am quite impressed by the way zsh works, I've just tried it. I
think it could even work that way in psql, including the slash commands. For
everyone who has never tried zsh, now is the time. ;-)
When you edit a multiline function in zsh, you can easily press Control-C,
then type "man zsh", return, and press "up" to continue editing the function
as it was left when you pressed Control-C.
This could work the same way in psql. You edit your query, press Control-C,
issue a backslash command, press up, finish your query.
The zsh that comes with my linux distribution is BSD licensed, so we could
even borrow code. :-)
On the other hand, I don't know if everybody will like it this way. Perhaps
this should be implemented as a "plugin". (Worst case scenario, but I wonder
wether we can make all people happy ever.)
Best Regards,
Michael Paesold
From | Date | Subject | |
---|---|---|---|
Next Message | Hannu Krosing | 2006-03-04 19:29:44 | Re: Constraint Exclusion and Partition Locking |
Previous Message | Hannu Krosing | 2006-03-04 18:40:49 | Re: Vertical Partitioning with TOAST |