Re: Using Expanded Objects other than Arrays from plpgsql
Andrey Borodin <x4mmm@yandex-team.ru>
From: Andrey Borodin <x4mmm@yandex-team.ru>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michel Pelletier <pelletier.michel@gmail.com>,
Pavel Stehule <pavel.stehule@gmail.com>,
pgsql-hackers@lists.postgresql.org
Date: 2025-01-26T10:07:22Z
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
Hello everyone in this thread. > On 21 Jan 2025, at 23:12, Tom Lane <tgl@sss.pgh.pa.us> wrote: > > somebody will review this I'm trying to dig into the patch set. My knowledge of the module is shallow and I hope to improve it by reading more patches in this area. This patch set provides a new test, which runs just fine without the patch. But it's somewhat expected, such optimizations must be transparent for user... And the coverage of newly invented mark_stmt() 42.37%. Some of branches are easy noops, but some are not. I assume as a granted that we will not every get into infinite loop in a recursive call of mark_stmt(). expr_is_assignment_source() is named like if it should return nool, but it's void. I could not grasp from reading the code one generic question about new optimization rule. What cost does checking for possible in-place update incurs to code cannot have this optimization? Is it O(numer_of_arguments) of for every assignment execution? Thanks! Best regards, Andrey Borodin.