Search Postgresql Archives

Re: How to I select value of GUC that has - in its name?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/9/21 7:45 AM, hubert depesz lubaczewski wrote:
On Tue, Feb 09, 2021 at 07:41:02AM -0800, Adrian Klaver wrote:
The only way I found so far is:
select setconfig[array_position(setconfig, 'custom.bad-guc=1a')] from
pg_db_role_setting where setrole = 'aklaver'::regrole;

Yeah, but this will require some parsing if I don't know what the value
is.
Of course, it's not impossible, I can:
with x as (
     select unnest(setconfig) as u
     from pg_db_role_setting
     where setrole = 'depesz'::regrole
)
select regexp_replace(u, '^[^=]*=', '') from x where u like 'custom.bad-guc=%';

but I find it curious that I can set the guc using normal-ish SET, but
can't get it using SHOW or even select current_setting()

Yeah, I think that part is a bug report.


depesz



--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux