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

Re: [GENERAL] psql \s not working - OS X

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joel Jacobson <joel(at)gluefinance(dot)com>
Cc: pgsql-bugs(at)postgreSQL(dot)org
Subject: Re: [GENERAL] psql \s not working - OS X
Date: 2011-06-15 15:16:35
Message-ID: 28664.1308150995@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-general
Joel Jacobson <joel(at)gluefinance(dot)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

In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2011-06-15 16:21:59
Subject: Re: BUG #6060: does not work -z option of pg_basebackup
Previous:From: Tom LaneDate: 2011-06-15 14:05:17
Subject: Re: Postgresql 9.0.4 initdb bug on solaris 64 bit

pgsql-general by date

Next:From: Pavel StehuleDate: 2011-06-15 15:19:24
Subject: Re: Encryption For Specific Column- Where to store the key
Previous:From: pedzDate: 2011-06-15 14:07:41
Subject: Re: Out of tree build issue

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