Re: [PATCHES] psql 'none' as a HISTFILE special case - Mailing list pgsql-hackers

From Martin Atukunda
Subject Re: [PATCHES] psql 'none' as a HISTFILE special case
Date
Msg-id ce92d7150608251102t2198719drf538b6664322621a@mail.gmail.com
Whole thread Raw
In response to Re: [PATCHES] psql 'none' as a HISTFILE special case  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 8/25/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Martin Atukunda" <matlads@gmail.com> writes:
> > On 8/25/06, Tom Lane <tgl@sss.pgh.pa.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

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Tricky bugs in concurrent index build
Next
From: Peter Eisentraut
Date:
Subject: Re: [GENERAL] invalid byte sequence ?