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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Sergey E(dot) Koposov" <math(at)sai(dot)msu(dot)ru>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, 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-12 03:39:44
Message-ID: 7580.1139715584@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

"Sergey E. Koposov" <math(at)sai(dot)msu(dot)ru> writes:
> But concerning to your zero byte change, it currently just broke
> everything (as I thought, and that's why I didn't implemented it). The
> problem with using zero byte is that it breaks all the readline functions
> read_history and write_history. Those functions deal with usual C
> strings, so putting zero byte inside them will just truncate everything.
> (that's exactly what occur with the psql from CVS).

If CVS tip is actually broken, we'd better revert this patch and
rethink the approach.

> So, I don't know. There are two alternatives. One is to use 0x01 byte
> instead: (at least I don't really agree with Tom's comments about possible
> problems with using 0x01 with some exotic encodings)

Just because you don't use far eastern encodings doesn't mean there's
not a large contingent who do.

I don't understand why any of these shenanigans are needed. If \e is
able to stick a multiline entry into the history, why can't the other
code do it?

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2006-02-12 03:42:59 Re: [HACKERS] Spaces in psql output (Was: FW: PGBuildfarm member snake Branch HEAD Status changed)
Previous Message Tom Lane 2006-02-12 03:34:41 Re: [COMMITTERS] pgsql: Allow ALTER TABLE ...