Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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: special_case_DEVNULL.diff
Description: application/octet-stream (359 bytes)

In response to

pgsql-hackers by date

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

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group