Re: Using Expanded Objects other than Arrays from plpgsql
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michel Pelletier <pelletier.michel@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2024-11-01T22:27:53Z
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 extension functions to participate in in-place updates.
- c366d2bdba7c 18.0 landed
-
Implement new optimization rule for updates of expanded variables.
- 6c7251db0ce1 18.0 landed
-
Detect whether plpgsql assignment targets are "local" variables.
- 36fb9ef269a0 18.0 landed
-
Preliminary refactoring of plpgsql expression construction.
- a654af21ae52 18.0 landed
-
Refactor pl_funcs.c to provide a usage-independent tree walker.
- 6a7283dd2f1c 18.0 landed
-
Generalize plpgsql's heuristic for importing expanded objects.
- 534d0ea6c2b9 18.0 landed
Attachments
- v1-0001-Preliminary-refactoring.patch (text/x-diff) patch v1-0001
- v1-0002-Detect-whether-plpgsql-assignment-targets-are-loc.patch (text/x-diff) patch v1-0002
- v1-0003-Implement-new-optimization-rule-for-updates-of-ex.patch (text/x-diff) patch v1-0003
Michel Pelletier <pelletier.michel@gmail.com> writes: > That all sounds great, and it sounds like my prosupport function just needs > to return true, or set some kind of flag saying aliasing is ok. I'd like > to help as much as possible, but some of that reparenting stuff was pretty > deep for me, other than being a quick sanity check case, is there anything > I can do to help? I wasn't expecting you to write the code, but if you can test it and see how much it helps your use-case, that would be great. Here is a v1 patch series that does the first part of what we've been talking about, which is to implement the new optimization rule for the case of a single RHS reference to the target variable. I'm curious to know if it helps you at all by itself. You'll definitely also need commit 534d0ea6c, so probably applying these on our git master branch would be the place to start. regards, tom lane