Re: Tab completion regression test failed on illumos - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Tab completion regression test failed on illumos
Date
Msg-id CA+hUKGLwu9siNqD6fJbcM7+2C6VDcfGbCayKzGvizkFz0MDtQw@mail.gmail.com
Whole thread Raw
In response to Re: Tab completion regression test failed on illumos  (Japin Li <japinli@hotmail.com>)
Responses Re: Tab completion regression test failed on illumos  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-hackers
On Fri, Nov 3, 2023 at 3:42 AM Japin Li <japinli@hotmail.com> wrote:
> On Thu, 02 Nov 2023 at 22:23, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > Japin Li <japinli@hotmail.com> writes:
> >> It seems the 'SEL\t' is converted to 'SEL     ' which is "SEL" with 5 spaces.
> >
> > That would be plausible if readline were disabled, or otherwise
> > not functioning.
> >
>
> I think this might be a bug comes from Illumos pseudo-tty. I can reproduce
> this by using pseudo-tty on Illumos.

I don't know but my guess is that this has to do with termios defaults
being different.  From a quick look at 'man termios', perhaps TABDLY
is set to expand tabs to spaces?  Can you fix it by tweaking the flags
in src/common/sprompt.c?  Somewhere near the line that disables ECHO,
perhaps you can figure out how to disable that in c_oflag?  This is
all the ancient forgotten magic that allows all Unixes to drive 70
year old electric typewriters, inserting suitable pauses and
converting various things as it goes.



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Three commit tips
Next
From: David Rowley
Date:
Subject: Re: Possible typo in nodeAgg.c