Re: Schema variables - new implementation for Postgres 15
Pavel Stehule <pavel.stehule@gmail.com>
From: Pavel Stehule <pavel.stehule@gmail.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>, Sergey Shinderuk <s.shinderuk@postgrespro.ru>,
Tomas Vondra <tomas.vondra@enterprisedb.com>, Julien Rouhaud <rjuju123@gmail.com>, dean.a.rasheed@gmail.com, er@xs4all.nl, joel@compiler.org, pgsql-hackers@lists.postgresql.org
Date: 2024-05-21T21:14:43Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Allow underscores in integer and numeric constants.
- faff8f8e47f1 16.0 cited
-
Remove special outfuncs/readfuncs handling of RangeVar.catalogname.
- 3cece34be842 16.0 cited
-
Remove extra space from dumped ALTER DEFAULT PRIVILEGES.
- 2af33369e794 16.0 cited
-
Create FKs properly when attaching table as partition
- b0284bfb1db5 16.0 cited
-
psql: improve tab-complete's handling of variant SQL names.
- 02b8048ba5dc 15.0 cited
Attachments
- v20240521-0019-transactional-variables.patch (text/x-patch) patch v20240521-0019
- v20240521-0016-plpgsql-implementation-for-LET-statement.patch (text/x-patch) patch v20240521-0016
- v20240521-0015-allow-parallel-execution-queries-with-session-variab.patch (text/x-patch) patch v20240521-0015
- v20240521-0018-this-patch-changes-error-message-column-doesn-t-exis.patch (text/x-patch) patch v20240521-0018
- v20240521-0017-expression-with-session-variables-can-be-inlined.patch (text/x-patch) patch v20240521-0017
- v20240521-0013-Implementation-of-NOT-NULL-and-IMMUTABLE-clauses.patch (text/x-patch) patch v20240521-0013
- v20240521-0014-allow-read-an-value-of-session-variable-directly-fro.patch (text/x-patch) patch v20240521-0014
- v20240521-0012-Implementation-of-DEFAULT-clause-default-expressions.patch (text/x-patch) patch v20240521-0012
- v20240521-0011-Implementation-ON-TRANSACTION-END-RESET-clause.patch (text/x-patch) patch v20240521-0011
- v20240521-0010-implementation-of-temporary-session-variables.patch (text/x-patch) patch v20240521-0010
- v20240521-0008-EXPLAIN-LET-support.patch (text/x-patch) patch v20240521-0008
- v20240521-0009-PREPARE-LET-support.patch (text/x-patch) patch v20240521-0009
- v20240521-0007-GUC-session_variables_ambiguity_warning.patch (text/x-patch) patch v20240521-0007
- v20240521-0006-plpgsql-tests.patch (text/x-patch) patch v20240521-0006
- v20240521-0005-memory-cleaning-after-DROP-VARIABLE.patch (text/x-patch) patch v20240521-0005
- v20240521-0003-function-pg_session_variables-for-cleaning-tests.patch (text/x-patch) patch v20240521-0003
- v20240521-0004-DISCARD-VARIABLES.patch (text/x-patch) patch v20240521-0004
- v20240521-0002-Storage-for-session-variables-and-SQL-interface.patch (text/x-patch) patch v20240521-0002
- v20240521-0001-Enhancing-catalog-for-support-session-variables-and-.patch (text/x-patch) patch v20240521-0001
Hi po 20. 5. 2024 v 9:11 odesílatel Pavel Stehule <pavel.stehule@gmail.com> napsal: > > > so 18. 5. 2024 v 18:31 odesílatel Alvaro Herrera <alvherre@alvh.no-ip.org> > napsal: > >> On 2024-Jan-30, Dmitry Dolgov wrote: >> >> > Yep, in this constellation the implementation holds much better (in >> > terms of memory) in my create/let/drop testing. >> > >> > I've marked the CF item as ready for committer, but a note for anyone >> > who would like to pick up it from here -- we're talking about first 5 >> > patches here, up to the memory cleaning after DROP VARIABLE. It doesn't >> > mean the rest is somehow not worth it, but I believe it's a good first >> > step. >> >> Hmm, I think patch 16 is essential, because the point of variable >> shadowing >> is a critical aspect of how the whole thing works. So I would say that >> a first step would be those first five patches plus 16. >> > > I'll move patch 16 to 6 position > reorderd set of patches - I moved forward plpgsql-tests.patch and GUC-session_variables_ambiguity_warning.patch 0006-plpgsql-tests.patch 0007-GUC-session_variables_ambiguity_warning.patch no other changes Regards Pavel > > Regards > > Pavel > >> >> I want to note that when we discussed this patch series at the dev >> meeting in FOSDEM, a sort-of conclusion was reached that we didn't want >> schema variables at all because of the fact that creating a variable >> would potentially change the meaning of queries by shadowing table >> columns. But this turns out to be incorrect: it's _variables_ that are >> shadowed by table columns, not the other way around. >> >> -- >> Álvaro Herrera PostgreSQL Developer — >> https://www.EnterpriseDB.com/ >> "No hay ausente sin culpa ni presente sin disculpa" (Prov. francés) >> >