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 1tYohL-00FXeT-SB for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Jan 2025 15:55:52 +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 1tYohJ-0018KQ-CF for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Jan 2025 15:55:49 +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 1tYohJ-0018KI-1O for pgsql-hackers@lists.postgresql.org; Fri, 17 Jan 2025 15:55:49 +0000 Received: from mail-yb1-xb2a.google.com ([2607:f8b0:4864:20::b2a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tYohG-0002lI-1h for pgsql-hackers@lists.postgresql.org; Fri, 17 Jan 2025 15:55:49 +0000 Received: by mail-yb1-xb2a.google.com with SMTP id 3f1490d57ef6-e39f43344c5so3364529276.1 for ; Fri, 17 Jan 2025 07:55:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737129345; x=1737734145; darn=lists.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=4DGCgOMC6iI6190XX2g4FGAoaCtgz20qidihhKroqS0=; b=auUB0khsvZORf6N5mDr/LKdKq1RHQviJMNLZOwbrnewTRNVr4/lWOcp2fQqGuEXjgS 6ZV0BDYfaxXJ8rMHxh7jrtjxwi2G0VqoutqdefUPYABZaenpf4ObC132kQPtB9n4A2wq jmqTPQl2HZMZhqBZml8JqWZBwdwFtQBvnyuPsjKw46bTOu+106MIkzYs04tl5WrOz5Q6 jIFJLVJLcTnEaq2wbNRuslelPHCiUzF1cJTIJGGXtUEVQ1XNKhCAWLQRFBOOQWVScZeV T1AMrfCeKCxqQy3ZBbKki9BvbGC44a7dwU8dDmnDKcqB1ho6q89B6lO+58tzAJ52/GKp gqnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737129345; x=1737734145; 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=4DGCgOMC6iI6190XX2g4FGAoaCtgz20qidihhKroqS0=; b=mSiiFXCd0DdyadosaFSyEeikEdMb8qhLnCiOQr2bjyvYtxG4QIkdeoo2AF3ECo0UMT Da4ODPizJoKrwEQBzTfWBLgkIjEtAEDxu8H4RPWUkBfUIJc5OmAfBmfNuhU6OCgDNjS4 obHcgz8WYecRhClFJ3KjJMV/YLEEN+Jo3kd+Z6MS1J80lDRWfrvx/S+dOF3zOarougUC zN1HvmP60cPRD+GsITu1AoAbUXlb4qXLR/WlVu3+oCqJSo4sLlZpQR74CNDlOOjJSBgT QXJJ++WUPprpooqTQwIiq3LOIr+75ylja+JQmOZfFuk0c6RysU95vkw3MO24WegYjaMj kh2w== X-Gm-Message-State: AOJu0YyYN2fICs8V2cTuxOX1fZz4u0WVBhric6bjUpQxT2b0C2IyCpv7 qCOG8qW+ixIsW4gO4NYMtAqcZBpk9+EviXXPMhbMlg1yAtCdk6MKyZ4S3IllgHtUdac4eWVcu+b 5tuv6mO8Hqpch/IqiuBpb6zXDuoc= X-Gm-Gg: ASbGncsRIcfmzgUA1QvQbya1vy0y4Gs7S2gyF61LuQ4qXvp9leQ2Rz1YMcWuEagvFK3 x440U72tQ8xSfGZ15sI9KzvVd2akk24AtLo4/U6gR0Q55vBhQDMgT8WX8iZ25Jxr4l3zzp20= X-Google-Smtp-Source: AGHT+IGCrp4wJB1bGD6g3/gwa1ovbhNqHIgoCY75vnwNjDBKL9ywbfKtUFkyU+Sg66TenUgezscv6TI3nPyRuDZn+Tg= X-Received: by 2002:a05:6902:124c:b0:e57:311d:3151 with SMTP id 3f1490d57ef6-e57b131a10bmr2067546276.30.1737129345085; Fri, 17 Jan 2025 07:55:45 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Pavel Stehule Date: Fri, 17 Jan 2025 16:55:07 +0100 X-Gm-Features: AbW1kvbevKt3Vyt-BoGpbKXCSLJUZ6lVTqHX1fQ8LbMkos-ttoKxtoSAAqF90BM Message-ID: Subject: Re: Fwd: Re: proposal: schema variables To: Bruce Momjian Cc: PostgreSQL Hackers Content-Type: multipart/alternative; boundary="0000000000008af859062be8f1f2" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000008af859062be8f1f2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable p=C3=A1 17. 1. 2025 v 16:35 odes=C3=ADlatel Bruce Momjian napsal: > On Fri, Jan 17, 2025 at 04:32:07PM +0100, Pavel Stehule wrote: > > This discussion was around 2017 when I wrote a proposal and I hadn't a > feeling > > 2017 is seven years ago so it would be good to get current feedback on > the desirability of this feature. > > > There is one stronger argument for session variables - we are missing > global > > temporary tables. It is a real > > limit and more times I found users with bloated pg_class, pg_attributes > due > > using temp tables. I don't believe > > so we can have a global temp table - it is a significantly more > difficult task > > than session variables. At the end > > session variables are trivial against global temp tables, and can repla= ce > > global temp tables in some use cases. > > And the solution can be nicer, cleaner, safer than with a workaround > based on > > GUC. > > So this feature would be like global GUC variables, with permission > control? > + types and domain type check - holds data in binary form - there are not conversions binary, text + it is declared - so less space for misuse is there. Custom GUC are absolutely tolerant + it is a fully database object, only owner can alter it, and event triggers are supported, sinval + possibility to set mutability, default value Regards Pavel > > -- > Bruce Momjian https://momjian.us > EDB https://enterprisedb.com > > Do not let urgent matters crowd out time for investment in the future. > > > --0000000000008af859062be8f1f2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


p=C3=A1 17. 1. = 2025 v=C2=A016:35 odes=C3=ADlatel Bruce Momjian <bruce@momjian.us> napsal:
On Fri, Jan 17, 2025 at 04:32:07PM +0100, Pav= el Stehule wrote:
> This discussion was around 2017 when I wrote a proposal and I hadn'= ;t a feeling

2017 is seven years ago so it would be good to get current feedback on
the desirability of this feature.

> There is one stronger argument for session variables - we are missing = global
> temporary tables. It is a real
> limit and more times I found users with bloated pg_class, pg_attribute= s due
> using temp tables. I don't believe
> so we can have a global temp table - it is a significantly more diffic= ult task
> than session variables. At the end
> session variables are trivial against global temp tables, and can repl= ace
> global temp tables in some use cases.
> And the solution can be nicer, cleaner, safer than with a workaround b= ased on
> GUC.

So this feature would be like global GUC variables, with permission
control?

+ types and domain type check - hol= ds data in binary form - there are not conversions binary, text
+ it is declared - so less s= pace for misuse is there. Custom GUC are absolutely tolerant
+ it is a fully database object= , only owner can alter it,=C2=A0 and event triggers are supported, sinval
+ possibility to set m= utability, default value

Regards<= /div>

Pavel

=C2=A0

--
=C2=A0 Bruce Momjian=C2=A0 <bruce@momjian.us>=C2=A0 =C2=A0 =C2=A0 =C2=A0 https://momjian.us=
=C2=A0 EDB=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 https:= //enterprisedb.com

=C2=A0 Do not let urgent matters crowd out time for investment in the futur= e.


--0000000000008af859062be8f1f2--