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

From Bruce Momjian
Subject Re: BUG #10991: psql -c ignores my pager settings in ~/.psqlrc
Date
Msg-id 20140730224909.GA1040@momjian.us
Whole thread Raw
In response to Re: BUG #10991: psql -c ignores my pager settings in ~/.psqlrc  (Matheus de Oliveira <matioli.matheus@gmail.com>)
Responses Re: BUG #10991: psql -c ignores my pager settings in ~/.psqlrc
List 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.fujii@gmail.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@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #11094: Does not report error
Next
From: Andrey Zhidenkov
Date:
Subject: Re: [ADMIN] Can postgres run autovacuum tasks when autovacuum is disabled?