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 1tuPmx-008HEP-3K for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Mar 2025 05:46:55 +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 1tuPmv-008846-9w for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Mar 2025 05:46:53 +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 1tuPmu-00883y-TL for pgsql-hackers@lists.postgresql.org; Tue, 18 Mar 2025 05:46:52 +0000 Received: from mail-yw1-x1134.google.com ([2607:f8b0:4864:20::1134]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tuPmr-003VDJ-06 for pgsql-hackers@lists.postgresql.org; Tue, 18 Mar 2025 05:46:52 +0000 Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-6fda22908d9so35068327b3.1 for ; Mon, 17 Mar 2025 22:46:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742276808; x=1742881608; 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=PE++svN0wo10dlMx0kWK5X1K4PPXogWvVJCwtJsNePM=; b=Q+/lwvPM2QiQ4Z1m70+YbadHa2qDJmpY9Ry3yNqRIQVcWrPacefspkW9V98lQ8yHmI HQRcO15iLDcwnvMddweMJELgmZpL3ByCQHiR7sVOnlO05VwwTxBdIsPxigl3UTdzj+BA P27qn/H1XQ0waKxx9ftEDfiZ5JMu4O0eADndnutWTicb51LmcML9U3b8f9cTJIr7hZXr n8BK8CqgVi9+4+5tGlm66F6fkNTbAkFDqdPGkgJAJuqCBdeDPiBU+BirYajSRZ1Sxx8x kMH1qDOb5lxhgnZv1SQo4bdY3k0zmCsoSdrgEu+jgsIkdYCu2rSbana7OfW1w/QcDNZP 5msg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742276808; x=1742881608; 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=PE++svN0wo10dlMx0kWK5X1K4PPXogWvVJCwtJsNePM=; b=EZq/latlOGHx6NyRarzESECv/U9q/aNe5B3rX7cSnChG3ETGmkCh0kiSpSdk59Y65j xcR/Ru8b2D/Tgw1Of532UPIFY2lGh8iQAtClPJskV/lbsK7My6PJPtouDG3RzLnrXA+z ZqZqA7C9GqUbruNeg10EsYJ0IVrK82CVi7nw/cF5zFEB3G5ycxpRg9qxTT0A2+hHnMmJ ysThwwqPOnIIPFLaOWQErKRkvSaHgCPBepLEYQwYAWEtecQI9y6GA4jMB3fh111JCtAG yKVhun/kTnrPjP13/1bqpALQ3rQADNs2ijtaI+9ggbYWO0hdyvY/IC4GOVp6wY1HBjNK M0rA== X-Forwarded-Encrypted: i=1; AJvYcCX5GdN060Y8zEgX46HuSc9wAopBuqsKKPF5UP+zJMaU6Z3+WpV5BxLTBg6AlmdppRG1g64ZNWgoc0mVCkNc@lists.postgresql.org X-Gm-Message-State: AOJu0Yzn+M177+fa1/G2WzgElikbzQCg84daGGdOlPcGQmUhqaQoQVPj ptV8u5+zVqXmGDQhbV5E2vXO33t5GP75sqXQSAqyqDjVUxBtvELTBtquW+h7wmiTALIxZBSLvmd 3kb3cox5jtsWxOCEVmC5RfQlBJ7s= X-Gm-Gg: ASbGncsp+2tJ6cckdA6fJu0xSp4x25ZZpWawwC+Uti51ABUfB6UhBWCBbdTl5KCTb5O ZFXZAK/RtytSBDT5CSorwugbFOBRs+CLg0+baSyOolT5pSg4+xDGZ0C1Ky3TY9iNrT3W/p+1eoG AyfXZq++oIBn4p6FMIhPm6z25Se/EMA5b1Gfn/CaRgw7l48rhW4nSl3ISdp4I= X-Google-Smtp-Source: AGHT+IEaJ78LKV/sxhiXS1D3hO2hJ7sc2TvMfsFOruSfBbPV6BiK32flSfrxSCvkUpwlH933TDA3qvUn23b5BjE5GsM= X-Received: by 2002:a05:6902:260e:b0:e63:f1c4:4db with SMTP id 3f1490d57ef6-e63f65a6e65mr17324517276.34.1742276808089; Mon, 17 Mar 2025 22:46:48 -0700 (PDT) MIME-Version: 1.0 References: <3chredgnjcmccym2kczawfih226b4ac6co7p6z4jeofevrcosi@mrsxkx2x2c65> <20241120201313.t4wbhld4ktgielaf@erthalion.local> In-Reply-To: From: Pavel Stehule Date: Tue, 18 Mar 2025 06:46:09 +0100 X-Gm-Features: AQ5f1JqQQXXpsiLp13oEsmgNz7ii7DsGmUkE0FNmyK6qqIUMbPlfhAiImgJjDhE Message-ID: Subject: Re: Re: proposal: schema variables To: Marcos Pegoraro Cc: jian he , Dmitry Dolgov <9erthalion6@gmail.com>, Laurenz Albe , Erik Rijkers , Michael Paquier , Amit Kapila , DUVAL REMI , PostgreSQL Hackers Content-Type: multipart/alternative; boundary="0000000000003f2d2c0630976e61" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000003f2d2c0630976e61 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi po 17. 3. 2025 v 21:53 odes=C3=ADlatel Marcos Pegoraro napsal: > Em seg., 17 de mar. de 2025 =C3=A0s 15:33, Pavel Stehule < > pavel.stehule@gmail.com> escreveu: > >> I was asked for sending a reduced patchset >> > > Would be good to explain what this reduced patchset is. > Complete patch contains this and that > Reduced patch contains only this. > Reduced patch contains: * possibility to create and drop session variables (support for catalog pg_variable and related operations) * possibility to set the session variable (command LET) and possibility to use session variable in the query * access right support * support for DISCARD command * memory cleaning at transaction end when the variable is dropped * warning when variable is shadowed by column * introduction of variable's fences - syntax VARIABLE(varname) Complete patch contains plus * LET can be described by EXPLAIN * LET can be prepared statement * temporary session variables * RESET at transaction end * implementation of DEFAULT value for the variable * implementation IMMUTABLE and NOT NULL clauses for the variable * variable can be used as an argument of CALL statement (and doesn't block simple evaluation in plpgsql) * used variable doesn't block with parallel execution * LET from plpgsql can use simple expression evaluation (performance optimization for PL/pgSQL) * variables doesn't block inlining SQL functions * fix message "column doesn't exist" to "column or variable doesn't exist" * support for transactional variables (content can be transactional) * possibility to specify the name of restored variable for pg_restore Regards Pavel > > Regards > Marcos > --0000000000003f2d2c0630976e61 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

po 17. 3. 2025 v=C2=A021:53 o= des=C3=ADlatel Marcos Pegoraro <mar= cos@f10.com.br> napsal:
Em seg., 17 de mar. d= e 2025 =C3=A0s 15:33, Pavel Stehule <pavel.stehule@gmail.com> escreveu:
I was asked for sending a reduced patchset

Would be good to explain what this reduced patchset is.
Complete patch contains this and that
Reduced patch contains only this.

Reduced patch contains:

* possibility to create and drop session variables (support= for catalog pg_variable and related operations)
* possibility to= set the session variable (command LET) and possibility to use session vari= able in the query
* access right support
* support for = DISCARD command
* memory cleaning at transaction end when the var= iable is dropped
* warning when variable is shadowed by column
* introduction of variable's fences - syntax VARIABLE(varname)<= /div>

Complete patch contains plus

<= div>* LET can be described by EXPLAIN
* LET can be prepared state= ment
* temporary session variables
* RESET at transacti= on end
* implementation of DEFAULT value for the variable
* implementation IMMUTABLE and NOT NULL clauses for the variable
* variable can be used as an argument of CALL statement (and doesn't= block simple evaluation in plpgsql)
* used variable doesn't = block with parallel execution
* LET from plpgsql can use simple e= xpression evaluation (performance optimization for PL/pgSQL)
* va= riables doesn't block inlining SQL functions
* fix message &q= uot;column doesn't exist" to "column or variable doesn't = exist"
* support for transactional variables (content can be= transactional)
* possibility to specify the name of restored var= iable for pg_restore

Regards

<= div>Pavel



=C2=A0
=

Regards
Marcos
--0000000000003f2d2c0630976e61--