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 1oebFp-0003jG-Vj for pgsql-general@arkaria.postgresql.org; Sat, 01 Oct 2022 12:06:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oebFn-0005uA-Qz for pgsql-general@arkaria.postgresql.org; Sat, 01 Oct 2022 12:05:59 +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 1oebFn-0005u0-GA for pgsql-general@lists.postgresql.org; Sat, 01 Oct 2022 12:05:59 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oebFj-00027Z-3P for pgsql-general@lists.postgresql.org; Sat, 01 Oct 2022 12:05:59 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id 4106F7D36; Sat, 1 Oct 2022 14:05:53 +0200 (CEST) Date: Sat, 1 Oct 2022 14:05:53 +0200 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Names of run-time configuration parameters (was: Limiting the operations that client-side code can perform upon its database backend's artifacts) Message-ID: <20221001120553.b7z7pujnmsllgn5b@hjp.at> Mail-Followup-To: pgsql-general@lists.postgresql.org References: <20220927222637.aolob6gk3kuyirfs@hjp.at> <87E125A5-A4B8-4BD6-9E9C-7ABF77650F3F@yugabyte.com> <20220928011353.zo7enlnig5vvpowe@jrouhaud> <5B23D9B8-56E8-458F-AD3D-B5F88AAB2844@yugabyte.com> <20220928025427.coznr3we5plyq5pp@jrouhaud> <3881881.1664337639@sss.pgh.pa.us> <20220930184515.mw2avsox5daz6yok@hjp.at> <35254B0B-6501-4CF6-A13F-76D03756C2B2@yugabyte.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="q24ti4rsn55sobkv" Content-Disposition: inline In-Reply-To: <35254B0B-6501-4CF6-A13F-76D03756C2B2@yugabyte.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --q24ti4rsn55sobkv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2022-09-30 17:59:01 -0700, Bryn Llewellyn wrote: > set rls.tenant_id=3D42; This works because there is a "." in the name. Without the "." PostgreSQL complains: hjp=3D> set rls_tenant_id=3D42; ERROR: unrecognized configuration parameter "rls_tenant_id" I think I sort of knew this but had forgotten about it, so checked the manual for the exact rules. Unfortunately I couldn't find them (I checked https://www.postgresql.org/docs/14/sql-set.html, https://www.postgresql.org/docs/14/config-setting.html, https://www.postgresql.org/docs/14/functions-admin.html#FUNCTIONS-ADMIN-SET, and browser the table of content and the index). =46rom the documentation I get the impression that you can only set existing parameters, not your own. I therefore suggest adding something like this to the section "configuration_parameter" in https://www.postgresql.org/docs/14/sql-set.html: | In addition, any name including a single dot (".") can be set. This | allows an application to define its own run-time parameters. Using the | application name as a prefix reduces the probability of name conflicts | with other applications or extensions. (This of course assumes that the behaviour is intentional and not a bug.) hp --=20 _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" --q24ti4rsn55sobkv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmM4LRwACgkQ8g5IURL+ KF1hhA//cxLzJ6hbZosKqJhwMPUhl214OAKn7fLpkTqvOowLaD0z1z0PFsnhHyWK LFvU0KSojhCekIVylWwFKnut2qqv6bXvrz3chuzTDWUer50l3h6oW4CXFVQkSXq8 nNdqkxrKzN4PsBwC2XtkWQ+kL5SUt9S2rgIQYsglwus/crE7sqGZIRr1qATdczUF xB7/kno6i7wvatiO0fvL51q2g8v5YJRCj5+HrNvLBEXujk0i5DkvzJVSC4ll2LQF CJGSxnLMv1T5xy7vDydgJtHbl1Y2pLd9IqxNExFe/XCVmZFttWSZhlKnD5HgyWAP jYwbYV4BfkkZTLbC9wPNYOwYe88CEVIgsGiD5bRw0HqLxu6tT1cCrqc3zHIiVD27 mKBs0VtQaSxwPI/wjOBLNLOX69+i4TLZq21BLtHCC/GcMyDSFcg93l7ORiUhfsRT ons8d8YbAPAzYPQ3wGotgmtI+o6qXmkG/KczCioLqZfN8lT00HxmngIzY5EMsNW5 GlQNSI2lSYmhVmI7mA6gxP1bjVEjz9K31uXNsxGxFg7cuk8aijZCN3+7qGkPL2D/ h571hY/7AsP40iN1WsRNGuHzJxnx+Ph/hdkyHwTxUq1OWAruKF09j2eN8cQdOaYA j6xxBTG4Dfe2PBIlsnNGAd5ibLGPO9OKWDdnitVjGnE6di21GH0= =Ot3k -----END PGP SIGNATURE----- --q24ti4rsn55sobkv--