From: | Victor Yegorov <vyegorov(at)gmail(dot)com> |
---|---|
To: | Luca Ferrari <fluca1978(at)gmail(dot)com> |
Cc: | pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: alter system appending to a value |
Date: | 2025-04-30 12:19:01 |
Message-ID: | CAGnEbogyL+2w59QDQg9dbFcFvmbfYp2jWwOjW9FTtuS_z9Oivw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
ср, 30 апр. 2025 г. в 14:15, Luca Ferrari <fluca1978(at)gmail(dot)com>:
> as trivial as it sounds, is there a smart way to use ALTER SYSTEM to
> append to a value?
> Something like: ALTER SYSTEM shared_preloaded_libraries =
> current_setting( 'shared_preloaded_libraries' ) || ',foo';
>
I would do smth like:
SELECT format( 'ALTER SYSTEM SET shared_preload_libraries = %L;', setting )
FROM pg_settings WHERE name = 'shared_preload_libraries' \gexec
Of course, you should add new value to the existing setting, making sure
there are no duplicates and the format is correct.
--
Victor Yegorov
From | Date | Subject | |
---|---|---|---|
Next Message | PALAYRET Jacques | 2025-04-30 12:29:11 | SQL ERROR subquery uses ungrouped column in PostgreSQL |
Previous Message | Luca Ferrari | 2025-04-30 11:14:29 | alter system appending to a value |