Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rFtpc-00Cgny-MQ for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Dec 2023 10:29:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rFtpb-00BAd9-Ab for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Dec 2023 10:29:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rFtpb-00BAbw-0p for pgsql-hackers@lists.postgresql.org; Wed, 20 Dec 2023 10:29:39 +0000 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rFtpZ-00Cweh-Aq for pgsql-hackers@postgresql.org; Wed, 20 Dec 2023 10:29:38 +0000 Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-50e270639d9so5477055e87.3 for ; Wed, 20 Dec 2023 02:29:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703068176; x=1703672976; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=XwQd/86A2x+lSjqlxd7amo10yNQDnfJJA8QzQspjs6I=; b=FEuUDvOkIAtsSXv3kEW6f8/2yzknUWMxX/LEuNYZqLJfYZAZ5qVJCpOL27mmf2AGK0 3JJq4p0Y8WcMr2jdppGSBZgQK2uaomShF6xyO3PnM+p8ch2mKBdlB8gCNgyDO3r39T1I FLEkeglFaIfc5lHTb4Y/YKB3oHry89u+sW2e+xlqKbGMMDhQDMKTxjmj29XCio8+eyOv eqlxa+oUl0OVUZ23qZ3eSR0r4sreeiAlfaHadB3y1PGKed7HlgQaRXSCQ8GGVvt5gke3 raXqOmXv0hkhu3WKGzhpUSAy2xbiBOnD1Sg3cYKrYgva9hzbxqOt8+xxVJD/KVCZyz+A MQiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703068176; x=1703672976; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XwQd/86A2x+lSjqlxd7amo10yNQDnfJJA8QzQspjs6I=; b=ZjU74Y+psg58Xxg2JRTraVljfr5ZWSRkq/TR5+pSP26OlfgkSqNlAkfqbaobTZarLk rkXl/Fto62aZm5Q8RpUeBBn6PJmGpI1KMLvUNtClzLwjZwh4nk0jsp6XTLxiHkMFFD6K RJKV3XYirrJLVS94/5jni2yadybsjHv95GtQ3XCAiqyN3bfiTN3J25cPw5xzIHRLe4wE YBz6zc9C02VTGJBkVWu8eZC4hv64WBQpAUshR+zdl6p4ZxIxuNAFFvWMRbcm/f/jxO1s fmhqYzXw8MlpQ+HuX1la+5cwGPpeiNeqEUis//OMGAQRxAwSQ3xSqVd39ERybSSCfJS+ Vhxg== X-Gm-Message-State: AOJu0Yyw/4PR8efU3GdWJNbYarJ0RN0drpeSmr7woJcrBCpa79VOI0Ch gAqP5fKfB1Qh+0vT+A4nVmH/i1T2ZYXmyiNd1xXyAenLToI= X-Google-Smtp-Source: AGHT+IEiRyPnlBThiJzvB7akHyx39Ic6pyRGF5Jcq+XE7RQTWWOrunU6Iuc0h63rWj/l0DFEE8mdwtpTteaKu2jTIuc= X-Received: by 2002:a05:6512:10c3:b0:50e:5250:cea4 with SMTP id k3-20020a05651210c300b0050e5250cea4mr435049lfg.101.1703068175815; Wed, 20 Dec 2023 02:29:35 -0800 (PST) MIME-Version: 1.0 References: <35888.1702998819@sss.pgh.pa.us> In-Reply-To: <35888.1702998819@sss.pgh.pa.us> From: Alexander Kukushkin Date: Wed, 20 Dec 2023 11:29:24 +0100 Message-ID: Subject: Re: Allow custom parameters with more than one dot in config files. To: Tom Lane Cc: PostgreSQL-development Content-Type: multipart/alternative; boundary="000000000000a5d69e060cee75bd" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000a5d69e060cee75bd Content-Type: text/plain; charset="UTF-8" On Tue, 19 Dec 2023 at 16:13, Tom Lane wrote: > > I wonder if we wouldn't be better advised to require exactly one dot. > This isn't a feature that we really encourage users to use, and the > further we move the goalposts for it, the harder it will be to replace > it. In particular I doubt the long-stalled session-variables patch > could support such names, since it needs the names to conform to > normal SQL rules. > If I understand correctly, session variables don't even intersect with custom parameters. Also, they seems to work fine with FQDN: postgres=# create database testdb; CREATE DATABASE postgres=# \c testdb You are now connected to database "testdb" as user "akukushkin". testdb=# create schema testschema; CREATE SCHEMA testdb=# create variable testdb.testschema.testvar int; CREATE VARIABLE testdb=# let testdb.testschema.testvar = 1; LET testdb=# select testdb.testschema.testvar; testvar --------- 1 (1 row) Regards, -- Alexander Kukushkin --000000000000a5d69e060cee75bd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, 19 Dec 2023 at 16:13, Tom Lan= e <tgl@sss.pgh.pa.us> wrote:=

I wonder if we wouldn't be better advised to require exactly one dot. This isn't a feature that we really encourage users to use, and the
further we move the goalposts for it, the harder it will be to replace
it.=C2=A0 In particular I doubt the long-stalled session-variables patch could support such names, since it needs the names to conform to
normal SQL rules.

If I understand corre= ctly, session variables don't even intersect with custom parameters.
Also, they seems to work fine with FQDN:
postgres=3D# cre= ate database testdb;
CREATE DATABASE
postgres=3D# \c testdb
You a= re now connected to database "testdb" as user "akukushkin&qu= ot;.
testdb=3D# create schema testschema;
CREATE SCHEMA
testdb=3D#= create variable testdb.testschema.testvar int;
CREATE VARIABLE
testd= b=3D# let testdb.testschema.testvar =3D 1;
LET
testdb=3D# select test= db.testschema.testvar;
=C2=A0testvar
---------
=C2=A0 =C2=A0 =C2= =A0 =C2=A01
(1 row)
=C2=A0
Regards,
--
Alexander Kukushkin
--000000000000a5d69e060cee75bd--