Re: [HACKERS] psql 'none' as a HISTFILE special case

From: "Martin Atukunda" <matlads(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org, "Peter Eisentraut" <peter_e(at)gmx(dot)net>, "Bruce Momjian" <bruce(at)momjian(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] psql 'none' as a HISTFILE special case
Date: 2006-08-25 18:02:43
Message-ID: ce92d7150608251102t2198719drf538b6664322621a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On 8/25/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Martin Atukunda" <matlads(at)gmail(dot)com> writes:
> > On 8/25/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> There's probably no way to get Apple's libedit to not try the fchmod,
> >> so what do we want to do here? Maybe special-case the string
> >> "/dev/null"?
>
> > If this is OK, I can up with a patch that special cases /dev/null as a
> > HISTFILE if libedit is found.
>
> I was thinking of basically a one-liner addition to write_history
> to skip the whole thing if strcmp(fname, DEVNULL) == 0. Should be
> reasonably inoffensive on anyone's machine.

I guess you meant saveHistory instead of write_history here. :)

something like the attached diff

- Martin -

Attachment Content-Type Size
special_case_DEVNULL.diff application/octet-stream 360 bytes

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2006-08-25 18:13:39 Re: [GENERAL] invalid byte sequence ?
Previous Message Tom Lane 2006-08-25 17:59:36 Re: Tricky bugs in concurrent index build

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2006-08-26 00:08:48 Re: plpython improvements
Previous Message Tom Lane 2006-08-25 17:46:11 Re: [HACKERS] psql 'none' as a HISTFILE special case