Re: TODO item -- Improve psql's handling of multi-line

Поиск
Список
Период
Сортировка
От Sergey E. Koposov
Тема Re: TODO item -- Improve psql's handling of multi-line
Дата
Msg-id Pine.LNX.4.44.0512080703070.30096-200000@lnfm1.sai.msu.ru
обсуждение исходный текст
Ответ на Re: TODO item -- Improve psql's handling of multi-line  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: TODO item -- Improve psql's handling of multi-line  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
On Wed, 7 Dec 2005, Andrew Dunstan wrote:

> Sergey E. Koposov wrote:
>
> >I also wanted this feature for a long time.
> >And I agree that it is rather simple to just remove the \n when writing to the
> >readline history file, but I don't think that's what everybody wants. I
> >think that people want to preserve the original formatting...
> >
> >So in that case the solution can be just putting some symbol instead of \n
> >in the history file, and during the loading of that file replace it back
> >(that symbol can be zero byte for example). But I'm not sure that people
> >will like that solution too.
> >
> A zero byte is probably a pretty bad choice. Some other low valued byte
> (e.g. \x01 ) would probably work better.
>
> And I agree that format preservation is highly desirable.



If actually the idea with just replacing '\n' in the history with other
byte is not rejected I'm
sending the new version of the psql patch including also the saving of the
multiline queries in the history (even after exiting the psql).
Currently I replace '\n' with the '\x01' as Andrew suggested.

Regards,

    Sergey



*****************************************************
Sergey E. Koposov
Max-Planck Institut for Astronomy
Web: http://lnfm1.sai.msu.ru/~math
E-mail: math@sai.msu.ru

Вложения

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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: TODO item -- Improve psql's handling of multi-line
Следующее
От: Tom Lane
Дата:
Сообщение: Re: TODO item -- Improve psql's handling of multi-line