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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Sergey E(dot) Koposov" <math(at)sai(dot)msu(dot)ru>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Andreas Seltenreich <seltenreich(at)gmx(dot)de>, pgsql-patches(at)postgresql(dot)org
Subject: Re: TODO item -- Improve psql's handling of multi-line
Date: 2006-02-11 21:57:15
Message-ID: 200602112157.k1BLvFu12479@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


Modified patch attached and applied. Thanks.

I adjusted based on Tom's comments to use a zero byte, and to clean up
the formatting. I didn't see any extra non-readline overhead, just
calls to functions that are no-ops in non-readline cases.

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

Tom Lane wrote:
> "Sergey E. Koposov" <math(at)sai(dot)msu(dot)ru> writes:
> > On Wed, 7 Dec 2005, Andrew Dunstan wrote:
> >> A zero byte is probably a pretty bad choice. Some other low valued byte
> >> (e.g. \x01 ) would probably work better.
>
> > Currently I replace '\n' with the '\x01' as Andrew suggested.
>
> Won't this get confused by some of the Far Eastern encodings we support?
> The zero-byte approach is at least proof against that. But what we need
> to ask is whether we can expect readline to cope with either.
>
> The patch *looks* pretty ugly: random insertions of blank space,
> general failure to conform to the project's code layout conventions,
> etc. (Some of this would get cleaned up by pgindent, but I'm not sure
> how much.) Also I get the impression that the patch enforces a lot of
> history maintenance overhead even in the non-USE_READLINE case, which is
> surely useless.
>
> 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
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 9.6 KB

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2006-02-11 22:17:20 pgsql: Allow ALTER TABLE ...
Previous Message Tom Lane 2006-02-11 21:36:03 Re: Skipping VACUUM of indexes when no work required