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

From: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #10991: psql -c ignores my pager settings in ~/.psqlrc
Date: 2014-07-18 17:54:18
Message-ID: 1405706058479-5811989.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Fujii Masao-2 wrote
> On Sat, Jul 19, 2014 at 1:04 AM, &lt;

> andrew.pennebaker@

> &gt; wrote:
>> The following bug has been logged on the website:
>>
>> Bug reference: 10991
>> Logged by: Andrew Pennebaker
>> Email address:

> andrew.pennebaker@

>> PostgreSQL version: 9.3.4
>> Operating system: Ubuntu 14.04
>> Description:
>>
>> I never want to use the pager, as it comes up at the most inopportune
>> times
>> in Emacs shell-mode, so I have configured my ~/.psqlrc with:
>>
>> \pset pager off
>>
>> 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

If you use "psql -c" a lot you should probably create a function/alias that
configures it in a way that is similar to the .psqlrc file you created.

Also, psql -c isn't just ignoring your pager settings but anything that is
in the .psqlrc file...as Fujii said this is documented quite explicitly in
the psql arguments section.

David J.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/BUG-10991-psql-c-ignores-my-pager-settings-in-psqlrc-tp5811971p5811989.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Arthur O'Dwyer 2014-07-18 18:58:49 Re: BUG #10976: Two memory leaks in regcomp cleanup
Previous Message Fujii Masao 2014-07-18 17:36:05 Re: BUG #10991: psql -c ignores my pager settings in ~/.psqlrc