From: Tom Lane <tgl@sss.pgh.pa.us>
To: Joel Jacobson <joel@gluefinance.com>
Cc: pgsql-bugs@postgreSQL.org
Subject: Re: [GENERAL] psql \s not working - OS X
Date: Wed, 15 Jun 2011 11:16:35 -0400
Message-ID: <28664.1308150995@sss.pgh.pa.us> (raw)
In-Reply-To: <BANLkTikehhEPdKESpbrqo=KMmSS71QeDOQ@mail.gmail.com>
References: <BANLkTikehhEPdKESpbrqo=KMmSS71QeDOQ@mail.gmail.com>
Joel Jacobson <joel@gluefinance.com> writes:
> I'm trying the new 9.1b2 release and got a weird problem with the \s
> command to show the latest history, for some reason it's trying to
> write to /dev/tty instead of printing out to stdout:
> glue=# \s
> could not save history to file "/dev/tty": Operation not permitted
Yeah, it's always done that. libedit thinks it should do chmod()
on the target file, which while not inherently unreasonable is
guaranteed to spit up on /dev/tty.
Another problem with implementing \s-to-display as save-to-/dev/tty
is that if something did come out, it would be in libedit's rather ugly
encoded format. libreadline happens to save the history file without
any decoration, but it's improper of us to depend on that.
We really ought to get rid of that implementation entirely and have
a separate code path for \s-to-display, which for extra credit could
go through the pager.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, joel@gluefinance.com
Subject: Re: [GENERAL] psql \s not working - OS X
In-Reply-To: <28664.1308150995@sss.pgh.pa.us>
References: <BANLkTikehhEPdKESpbrqo=KMmSS71QeDOQ@mail.gmail.com> <28664.1308150995@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox