From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Joao Miguel Ferreira <joao.miguel.c.ferreira@gmail.com>
To: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: permanent setting of config variables
Date: Thu, 18 Feb 2021 11:52:11 +0100
Message-ID: <d8935d2d3958d899755cb4402e98aff054c5effd.camel@cybertec.at> (raw)
In-Reply-To: <CALyyT7SvhtuHCxzHT8mSpPgGiY697-yq5cwGGmuhF395EdCzqQ@mail.gmail.com>
References: <CALyyT7SvhtuHCxzHT8mSpPgGiY697-yq5cwGGmuhF395EdCzqQ@mail.gmail.com>
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');
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: laurenz.albe@cybertec.at, joao.miguel.c.ferreira@gmail.com
Subject: Re: permanent setting of config variables
In-Reply-To: <d8935d2d3958d899755cb4402e98aff054c5effd.camel@cybertec.at>
References: <CALyyT7SvhtuHCxzHT8mSpPgGiY697-yq5cwGGmuhF395EdCzqQ@mail.gmail.com> <d8935d2d3958d899755cb4402e98aff054c5effd.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox