Re: BUG #10991: psql -c ignores my pager settings in ~/.psqlrc

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Matheus de Oliveira <matioli(dot)matheus(at)gmail(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, andrew(dot)pennebaker(at)gmail(dot)com, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #10991: psql -c ignores my pager settings in ~/.psqlrc
Date: 2014-07-30 22:49:09
Message-ID: 20140730224909.GA1040@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Jul 18, 2014 at 05:17:42PM -0300, Matheus de Oliveira wrote:
>
> On Fri, Jul 18, 2014 at 2:36 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>
> > This works for psql -f <script>.psql. However, when I run one-off
> commands
> > with psql -c <command>, the pager pops up again, making psql -c really
> hard
> > to use in my Emacs workflow.
>
> .psqlrc file is ignored with -c option. This behavior is documented.
> http://www.postgresql.org/docs/devel/static/app-psql.html#R1-APP-PSQL-3
>
>
> A nice workaround is:
>
>     $ echo "YOUR COMMANDS HERE" | psql

I assume psql --no-psqlrc also works.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message craig 2014-07-30 23:33:28 BUG #11095: quickdie() calls syslog() in a signal handler leading to deadlock
Previous Message Davide Gonnella 2014-07-30 22:11:20 Is this a bug?