Re: permanent setting of config variables

Поиск
Список
Период
Сортировка
От Joao Miguel Ferreira
Тема Re: permanent setting of config variables
Дата
Msg-id CALyyT7Q0838OXHW-PhUkEnUG=tzexO65+D2W6Bn407erGsrS_g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: permanent setting of config variables  (Laurenz Albe <laurenz.albe@cybertec.at>)
Ответы Re: permanent setting of config variables  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-general
Hi,


On Thu, Feb 18, 2021 at 10:52 AM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
On Thu, 2021-02-18 at 09:09 +0000, Joao Miguel Ferreira wrote:
> I have a few PL/pgSQL functions that use queires like "SHOW company.product INTO _product_name" and "SHOW company.cluster INTO _cluster_number".
> But these are failing because I don't know how to set those values on a permanent basis, or maybe on startup would also be ok.
> I did read the "ALTER DATABASE " and the "set_config(...)" documentation and I experimented a bit with that but without succes.
> So my question would be: how to permanently set user specific config values that would become accessible to the "SHOW ...." SQL comand.

_product_name := current_setting('company.product');


I can not change the code in those functions. I need to make them work as they are.

So I guess I need to set those variables from an administration action rather than from a coding action.

Something like "ALTER SYSTEM SET company.procut TO 'SpaceCraft';" but this returns an error saying "ERROR:  unrecognized configuration parameter "company.procut". If I'm not  mistaken, the "SET ...." command lasts only for the duration of a client session. I need it to be permanent.
 
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

В списке pgsql-general по дате отправления:

Предыдущее
От: Luca Ferrari
Дата:
Сообщение: when is pg_stat_archiver.stats_reset modified?
Следующее
От: Ian Lawrence Barwick
Дата:
Сообщение: Re: when is pg_stat_archiver.stats_reset modified?