Show <parameter> in psql does any calculations?

From: Raghavendra <raghavendra(dot)rao(at)enterprisedb(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Show <parameter> in psql does any calculations?
Date: 2011-12-27 09:26:15
Message-ID: CA+h6AhjWypc-m=zQNizy1_dAcxQF14to_udvozOZDfJO9d-OEg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Respected,

Am in PG 9.1. See below ouputs.

*By query:*
postgres=# SELECT name, setting, unit,context FROM pg_settings WHERE
category like '%Resource Usage / Memory%' ORDER BY name;
name | setting | unit | context
---------------------------+---------+------+------------
maintenance_work_mem | 16384 | kB | user
max_prepared_transactions | 0 | | postmaster
max_stack_depth | 2048 | kB | superuser
shared_buffers | 4096 | 8kB | postmaster
temp_buffers | 1024 | 8kB | user
track_activity_query_size | 1024 | | postmaster
work_mem | 2048 | kB | user
(7 rows)

*By session command:*
postgres=# show work_mem ;
work_mem
----------
2MB
(1 row)

postgres=# show shared_buffers ;
shared_buffers
----------------
32MB
(1 row)

By the query, its clear that "setting" value is multiplied with unit to get
the sesssion level command value which is displayed here. However, I am
trying to get the query of it which is executed at session-level with SHOW
command. I tried "psql -E" option tooo..

-bash-3.2$ psql -E
psql.bin (9.1.0)
Type "help" for help.

postgres=# show work_mem ;
work_mem
----------
2MB
(1 row)

Why the query is not displayed with -E option ?
Am I missing something here, please help me in clarifying it.

---
Regards,
Raghavendra
EnterpriseDB Corporation
Blog: http://raghavt.blogspot.com/

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Guillaume Lelarge 2011-12-27 09:46:34 Re: Show <parameter> in psql does any calculations?
Previous Message robins.tharakan 2011-12-27 09:02:11 Re: Why does index not use for CTE query?