Query on pg_settings view

From: Ronen Nofar <ronennofar(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Query on pg_settings view
Date: 2017-11-15 09:17:17
Message-ID: CANV4-dgobjwre5FQbWjXEWsmv1+qX1dr9pFQstHS8mrGZ=GEMw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I have a weird case when running a query on the pg_settings view.
I have two users, first one is the default user - postgres which is a
superuser and another one is a role which i had created, i called it
test_role and it's not a superuser.
When I run a select on pg_settings with these two users I recieve different
results.
Running the query 'select * from pg_settings' with 'postgres' user returns
269 rows when running the same query with 'test_role' returns 254 rows.
For example, the following query 'select lower(setting) from pg_settings
where lower(name) = 'config_file'' returns null when I connect with
'test_role' but with 'postgres' user I recieve one row
(/var/lib/pgsql/9.6/data/postgresql.conf).

I have granted all privileges on pg_settings to 'test_role' but it didn't
changed the results.

I don't have any idea what it's wrong here.

The PostgreSQL version is PostgreSQL 9.6.1 on x86_64-pc-linux-gnu

Can you please help me with this issue?

Thanks in advance,
Ronen

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vikas Sharma 2017-11-15 09:59:57 Re: PGPool in Master-Master mode, is it possible?
Previous Message Eric D 2017-11-15 03:22:47 Re: archive_command not being executed