Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lCgux-00049y-6x for pgsql-general@arkaria.postgresql.org; Thu, 18 Feb 2021 10:52:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lCguv-0000rZ-Rr for pgsql-general@arkaria.postgresql.org; Thu, 18 Feb 2021 10:52:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lCguv-0000rS-Dp for pgsql-general@lists.postgresql.org; Thu, 18 Feb 2021 10:52:17 +0000 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lCgus-0008LZ-HX for pgsql-general@lists.postgresql.org; Thu, 18 Feb 2021 10:52:16 +0000 Received: by mail-ej1-x634.google.com with SMTP id ly28so4547936ejb.13 for ; Thu, 18 Feb 2021 02:52:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=gQU1IB+dYZ+zXT9YNR6QpbbGiMSoJfWGPK/ljonKhGc=; b=I2/1UfiX0pBXCqZpBgem57Iv0T+d3TfIUfwVu7TvC/R+4uaElJ4ZPTeJ34kGhj6nz/ X205PK7erLQ4gDwvch/oL+10qFMr31hq7RSu7C85eywV2fI4lH8VrMZA8VcL369qiXaq CfXs3jJG16tMt9n0uYTbFBDk24v7KcK8rl2L0FW+raBvgzPvyum7/u9j/gB/dVGrRKia 9bEc+agPrB0p7hWj+55W67w0vvWyYi/dOY/tHKrAZpbQDE1pZXiW8jot/9gmRrEdEtPI eWKIn/+ehDe48+2QU50HQIiw7WDE8/745i2xXC0Fx08NESyLsSCLaG8CXo7/A9XqLeud BMAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=gQU1IB+dYZ+zXT9YNR6QpbbGiMSoJfWGPK/ljonKhGc=; b=spe9XI5c1VO58QhTh6SeWxcbqB1XIpQH88jO1sp6IKsgmW686zAU7TFiB6pZq6uipg NvTGFKjRbEXeD9Dqg6/8GFKO0SlbBwy+OUC28CXZYch/NbnhhtjXn2Oxj2gypezA19aU ip/s0vBexGQTQrf8N3YJzdqK7i1cN8Ri+2RJ/GnLVQ8YGtWmUuPFFptDZtttf7XZ/HIf A7zhtEhQTSUy3CyKVz2LAQEXey9j4M5NgH4NyA4hceYLdLtbpvIzoRBBTQD6AoJjRM6T vURrYn7RiBscv58Ln1l+Wof0eLU7cnkelc3/IAXqFm00fFIDWNrPmfctJmG3cONWIxHn iC2g== X-Gm-Message-State: AOAM532yxPhjXiAohG9MP7mh/dFZsRH+xn5wSVZnvB5byotkRdEeJwu5 /Miv8YZDCphMPGRFQEzYaH2PEg== X-Google-Smtp-Source: ABdhPJyn2LC1krk5ddT/FZY8OCcDSctQpJTBopzn+D3okT50p1dmCQ74uZaqrRlGbTh4ypzT7R/dJg== X-Received: by 2002:a17:906:2acf:: with SMTP id m15mr3419933eje.118.1613645532488; Thu, 18 Feb 2021 02:52:12 -0800 (PST) Received: from localhost.localdomain (217-149-172-130.nat.highway.telekom.at. [217.149.172.130]) by smtp.gmail.com with ESMTPSA id u4sm2535518edq.17.2021.02.18.02.52.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Feb 2021 02:52:12 -0800 (PST) Message-ID: Subject: Re: permanent setting of config variables From: Laurenz Albe To: Joao Miguel Ferreira , pgsql-general Date: Thu, 18 Feb 2021 11:52:11 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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