Re: TODO item -- Improve psql's handling of multi-line - Mailing list pgsql-patches

From Andrew Dunstan
Subject Re: TODO item -- Improve psql's handling of multi-line
Date
Msg-id 4397A1C7.9070005@dunslane.net
Whole thread Raw
In response to Re: TODO item -- Improve psql's handling of multi-line  ("Sergey E. Koposov" <math@sai.msu.ru>)
Responses Re: TODO item -- Improve psql's handling of multi-line
List pgsql-patches

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.

cheers

andrew

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: TODO item -- Improve psql's handling of multi-line queries
Next
From: "Sergey E. Koposov"
Date:
Subject: Re: TODO item -- Improve psql's handling of multi-line