public inbox for [email protected]  
help / color / mirror / Atom feed
From: Victor Yegorov <[email protected]>
To: Luca Ferrari <[email protected]>
Cc: pgsql-general <[email protected]>
Subject: Re: alter system appending to a value
Date: Wed, 30 Apr 2025 15:19:01 +0300
Message-ID: <CAGnEbogyL+2w59QDQg9dbFcFvmbfYp2jWwOjW9FTtuS_z9Oivw@mail.gmail.com> (raw)
In-Reply-To: <CAKoxK+7UEeJhk_hbv1_3KwN1SD8O6ByU-cCr55mFDkErRxZcow@mail.gmail.com>
References: <CAKoxK+7UEeJhk_hbv1_3KwN1SD8O6ByU-cCr55mFDkErRxZcow@mail.gmail.com>

ср, 30 апр. 2025 г. в 14:15, Luca Ferrari <[email protected]>:

> 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


reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: alter system appending to a value
  In-Reply-To: <CAGnEbogyL+2w59QDQg9dbFcFvmbfYp2jWwOjW9FTtuS_z9Oivw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox