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

From Matheus de Oliveira
Subject Re: BUG #10991: psql -c ignores my pager settings in ~/.psqlrc
Date
Msg-id CAJghg4+2DQGCJY0O4NcsiLdoj-gH3FFR9U+f_TnLLY5p10+L3w@mail.gmail.com
Whole thread Raw
In response to Re: BUG #10991: psql -c ignores my pager settings in ~/.psqlrc  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: BUG #10991: psql -c ignores my pager settings in ~/.psqlrc  (Bruce Momjian <bruce@momjian.us>)
List pgsql-bugs
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

Regards,
--=20
Matheus de Oliveira
Analista de Banco de Dados
Dextra Sistemas - MPS.Br n=C3=ADvel F!
www.dextra.com.br/postgres

pgsql-bugs by date:

Previous
From: David G Johnston
Date:
Subject: Re: BUG #10991: psql -c ignores my pager settings in ~/.psqlrc
Next
From: "Arthur O'Dwyer"
Date:
Subject: Re: BUG #10976: Two memory leaks in regcomp cleanup