pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #10991: psql -c ignores my pager settings in ~/.psqlrc
8+ messages / 6 participants
[nested] [flat]
* BUG #10991: psql -c ignores my pager settings in ~/.psqlrc
@ 2014-07-18 16:04 andrew.pennebaker@gmail.com
0 siblings, 1 reply; 8+ messages in thread
From: andrew.pennebaker@gmail.com @ 2014-07-18 16:04 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 10991
Logged by: Andrew Pennebaker
Email address: andrew.pennebaker@gmail.com
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.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: BUG #10991: psql -c ignores my pager settings in ~/.psqlrc
@ 2014-07-18 17:36 Fujii Masao <masao.fujii@gmail.com>
parent: andrew.pennebaker@gmail.com
0 siblings, 2 replies; 8+ messages in thread
From: Fujii Masao @ 2014-07-18 17:36 UTC (permalink / raw)
To: andrew.pennebaker@gmail.com; +Cc: pgsql-bugs
On Sat, Jul 19, 2014 at 1:04 AM, <andrew.pennebaker@gmail.com> wrote:
> The following bug has been logged on the website:
>
> Bug reference: 10991
> Logged by: Andrew Pennebaker
> Email address: andrew.pennebaker@gmail.com
> 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
Regards,
--
Fujii Masao
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: BUG #10991: psql -c ignores my pager settings in ~/.psqlrc
@ 2014-07-18 17:54 David G Johnston <david.g.johnston@gmail.com>
parent: Fujii Masao <masao.fujii@gmail.com>
1 sibling, 0 replies; 8+ messages in thread
From: David G Johnston @ 2014-07-18 17:54 UTC (permalink / raw)
To: pgsql-bugs
Fujii Masao-2 wrote
> On Sat, Jul 19, 2014 at 1:04 AM, <
> andrew.pennebaker@
> > 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-tp58119...
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: BUG #10991: psql -c ignores my pager settings in ~/.psqlrc
@ 2014-07-18 20:17 Matheus de Oliveira <matioli.matheus@gmail.com>
parent: Fujii Masao <masao.fujii@gmail.com>
1 sibling, 1 reply; 8+ messages in thread
From: Matheus de Oliveira @ 2014-07-18 20:17 UTC (permalink / raw)
To: Fujii Masao <masao.fujii@gmail.com>; +Cc: andrew.pennebaker@gmail.com; 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,
--
Matheus de Oliveira
Analista de Banco de Dados
Dextra Sistemas - MPS.Br nível F!
www.dextra.com.br/postgres
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: BUG #10991: psql -c ignores my pager settings in ~/.psqlrc
@ 2014-07-30 22:49 Bruce Momjian <bruce@momjian.us>
parent: Matheus de Oliveira <matioli.matheus@gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Bruce Momjian @ 2014-07-30 22:49 UTC (permalink / raw)
To: Matheus de Oliveira <matioli.matheus@gmail.com>; +Cc: Fujii Masao <masao.fujii@gmail.com>; andrew.pennebaker@gmail.com; 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. +
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: BUG #10991: psql -c ignores my pager settings in ~/.psqlrc
@ 2014-07-31 11:32 Matheus de Oliveira <matioli.matheus@gmail.com>
parent: Bruce Momjian <bruce@momjian.us>
0 siblings, 1 reply; 8+ messages in thread
From: Matheus de Oliveira @ 2014-07-31 11:32 UTC (permalink / raw)
To: Bruce Momjian <bruce@momjian.us>; +Cc: Fujii Masao <masao.fujii@gmail.com>; Andrew Pennebaker <andrew.pennebaker@gmail.com>; pgsql-bugs
2014-07-30 19:49 GMT-03:00 Bruce Momjian <bruce@momjian.us>:
> I assume psql --no-psqlrc also works.
Well, I assumed the OP wanted the .psqlrc file to be loaded, this will do
exactly the opposite.
Regards,
--
Matheus de Oliveira
Analista de Banco de Dados
Dextra Sistemas - MPS.Br nível F!
www.dextra.com.br/postgres
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: BUG #10991: psql -c ignores my pager settings in ~/.psqlrc
@ 2014-07-31 12:16 Andrew Pennebaker <andrew.pennebaker@gmail.com>
parent: Matheus de Oliveira <matioli.matheus@gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Andrew Pennebaker @ 2014-07-31 12:16 UTC (permalink / raw)
To: Matheus de Oliveira <matioli.matheus@gmail.com>; +Cc: Fujii Masao <masao.fujii@gmail.com>; Bruce Momjian <bruce@momjian.us>; pgsql-bugs
Yeah, I was scratching my head on that one, haha.
On Jul 31, 2014 6:32 AM, "Matheus de Oliveira" <matioli.matheus@gmail.com>
wrote:
>
> 2014-07-30 19:49 GMT-03:00 Bruce Momjian <bruce@momjian.us>:
>
>> I assume psql --no-psqlrc also works.
>
>
> Well, I assumed the OP wanted the .psqlrc file to be loaded, this will do
> exactly the opposite.
>
> Regards,
> --
> Matheus de Oliveira
> Analista de Banco de Dados
> Dextra Sistemas - MPS.Br nível F!
> www.dextra.com.br/postgres
>
>
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: BUG #10991: psql -c ignores my pager settings in ~/.psqlrc
@ 2014-07-31 14:25 Bruce Momjian <bruce@momjian.us>
parent: Andrew Pennebaker <andrew.pennebaker@gmail.com>
0 siblings, 0 replies; 8+ messages in thread
From: Bruce Momjian @ 2014-07-31 14:25 UTC (permalink / raw)
To: Andrew Pennebaker <andrew.pennebaker@gmail.com>; +Cc: Matheus de Oliveira <matioli.matheus@gmail.com>; Fujii Masao <masao.fujii@gmail.com>; pgsql-bugs
On Thu, Jul 31, 2014 at 07:16:51AM -0500, Andrew Pennebaker wrote:
> Yeah, I was scratching my head on that one, haha.
>
> On Jul 31, 2014 6:32 AM, "Matheus de Oliveira" <matioli.matheus@gmail.com>
> wrote:
>
>
> 2014-07-30 19:49 GMT-03:00 Bruce Momjian <bruce@momjian.us>:
>
> I assume psql --no-psqlrc also works.
Oops, sorry, yeah.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2014-07-31 14:25 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-07-18 16:04 BUG #10991: psql -c ignores my pager settings in ~/.psqlrc andrew.pennebaker@gmail.com
2014-07-18 17:36 ` Fujii Masao <masao.fujii@gmail.com>
2014-07-18 17:54 ` David G Johnston <david.g.johnston@gmail.com>
2014-07-18 20:17 ` Matheus de Oliveira <matioli.matheus@gmail.com>
2014-07-30 22:49 ` Bruce Momjian <bruce@momjian.us>
2014-07-31 11:32 ` Matheus de Oliveira <matioli.matheus@gmail.com>
2014-07-31 12:16 ` Andrew Pennebaker <andrew.pennebaker@gmail.com>
2014-07-31 14:25 ` Bruce Momjian <bruce@momjian.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox